/* J Town Soaps — bright, soapy, retro preview theme
   Palette pulled from the logo (objective names):
   - Deep teal #165C6B (outer badge)
   - Soft aqua #A2DCE3 (inner circle / bubbles)
   - Warm yellow #F9C846 ("J TOWN" lettering)
   - Coral red #E34F43 (scarf / ribbon)
   - Cream #FDF5E2 (background / "SOAPS" lettering)
   - Near-black #1A2A2E (body text for contrast)
*/

:root {
  --teal-deep: #165C6B;
  --teal-mid: #1F7A8C;
  --aqua: #A2DCE3;
  --aqua-soft: #D6F1F4;
  --yellow: #F9C846;
  --yellow-soft: #FCE9A8;
  --coral: #E34F43;
  --coral-dark: #C43A30;
  --cream: #FDF5E2;
  --cream-dark: #F5E8C7;
  --ink: #1A2A2E;
  --ink-muted: #3D555A;
  --white: #FFFFFF;
  --shadow: 0 8px 24px rgba(22, 92, 107, 0.18);
  --radius: 18px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 1.05rem;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-deep); }
a:hover { color: var(--coral); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal-deep);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* Floating bubbles (decorative, aria-hidden) */
.bubbles {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.bubble {
  position: absolute;
  bottom: -4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), rgba(162,220,227,0.35));
  border: 1.5px solid rgba(162, 220, 227, 0.7);
  animation: rise linear infinite;
  opacity: 0.55;
}
@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.55; }
  90% { opacity: 0.35; }
  100% { transform: translateY(-110vh) scale(1.15); opacity: 0; }
}

.site-header, main, .site-footer { position: relative; z-index: 1; }

/* Header */
.site-header {
  background: var(--teal-deep);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  background: var(--cream);
}
.brand-text span { display: block; line-height: 1.15; }
.brand-text .tiny {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--aqua);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--aqua);
  color: var(--white);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
}
.nav-toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.15rem 1.1rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0.2rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: var(--yellow);
  color: var(--yellow-soft);
  outline: none;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
  }
  .site-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem 0 0.75rem;
    gap: 0.35rem;
  }
}

/* Hero */
.hero {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(249,200,70,0.25), transparent 50%),
    radial-gradient(ellipse at 80% 10%, rgba(227,79,67,0.18), transparent 45%),
    linear-gradient(165deg, var(--aqua-soft) 0%, var(--cream) 55%, var(--cream-dark) 100%);
  padding: 2.5rem 1.1rem 3rem;
  text-align: center;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr 1.1fr;
    text-align: left;
    gap: 2.5rem;
  }
}
.hero-logo {
  margin: 0 auto;
  width: min(320px, 78vw);
  border-radius: 50%;
  box-shadow: var(--shadow);
  background: var(--cream);
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  color: var(--teal-deep);
  margin: 0 0 0.6rem;
  line-height: 1.15;
}
.hero-copy .tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--ink-muted);
  margin: 0 0 1.4rem;
  max-width: 34ch;
}
@media (min-width: 800px) {
  .hero-copy .tagline { margin-left: 0; }
}
@media (max-width: 799px) {
  .hero-copy .tagline { margin-left: auto; margin-right: auto; }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
@media (min-width: 800px) {
  .hero-actions { justify-content: flex-start; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral-dark);
  box-shadow: 0 4px 0 var(--coral-dark);
}
.btn-primary:hover { background: var(--coral-dark); color: var(--white); }
.btn-secondary {
  background: var(--white);
  color: var(--teal-deep);
  border-color: var(--teal-deep);
}
.btn-secondary:hover { background: var(--aqua-soft); color: var(--teal-deep); }
.btn-yellow {
  background: var(--yellow);
  color: var(--ink);
  border-color: #D4A62E;
  box-shadow: 0 4px 0 #D4A62E;
}
.btn-yellow:hover { background: #F0B830; color: var(--ink); }
.btn-block { width: 100%; }

/* Sections */
.section {
  padding: 3rem 1.1rem;
}
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section-alt {
  background: linear-gradient(180deg, var(--aqua-soft), var(--cream));
}
.section-teal {
  background: var(--teal-deep);
  color: var(--white);
}
.section-teal a { color: var(--yellow); }
.section-teal a:hover { color: var(--yellow-soft); }

.section-head {
  text-align: center;
  margin-bottom: 2rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  color: var(--teal-deep);
  margin: 0 0 0.5rem;
}
.section-teal .section-head h2 { color: var(--yellow); }
.section-head p {
  margin: 0 auto;
  max-width: 48ch;
  color: var(--ink-muted);
}
.section-teal .section-head p { color: var(--aqua); }

.badge-placeholder {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

/* Product cards */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

.product-card {
  background: var(--white);
  border: 3px solid var(--teal-deep);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}
.product-card::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, var(--aqua));
  border: 1px solid rgba(22,92,107,0.25);
}
.product-visual {
  aspect-ratio: 1;
  border-radius: 14px;
  background:
    radial-gradient(circle at 40% 35%, rgba(255,255,255,0.9), transparent 40%),
    linear-gradient(145deg, var(--aqua) 0%, var(--teal-mid) 100%);
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
  padding: 1rem;
  border: 2px dashed rgba(255,255,255,0.5);
}
.product-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--teal-deep);
}
.product-meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}
.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--coral);
  margin: 0;
}
.product-card .card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Shopify Buy Button slot — leave empty until Shopify is wired */
.shopify-buy-slot {
  min-height: 0;
  /* Intentionally empty. Shopify Buy Button embed goes here later. */
}

/* About */
.about-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 760px) {
  .about-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}
.about-card, .info-card, .form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 2px solid var(--aqua);
  box-shadow: var(--shadow);
}
.about-card h3, .info-card h3 {
  margin-top: 0;
  color: var(--teal-deep);
}
.placeholder-text {
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
  padding: 0.75rem 1rem;
  border-radius: 0 10px 10px 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  color: var(--ink);
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.info-list li {
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--aqua);
}
.info-list li:last-child { border-bottom: none; }
.info-list strong { color: var(--teal-deep); }

/* Forms */
.form-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .form-grid.two { grid-template-columns: 1fr 1fr; }
}
label {
  display: block;
  font-weight: 650;
  margin-bottom: 0.3rem;
  color: var(--teal-deep);
  font-size: 0.92rem;
}
.req { color: var(--coral); }
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--aqua);
  border-radius: 10px;
  font: inherit;
  background: var(--white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--yellow);
  border-color: var(--teal-deep);
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0.5rem 0 0;
}
.form-status {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok {
  background: #E4F7EA;
  border: 2px solid #2E8B57;
  color: #14532D;
}
.form-status.err {
  background: #FDE8E6;
  border: 2px solid var(--coral);
  color: #7F1D1D;
}

.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: 520px;
  margin: 0 auto;
}
.signup-row input {
  flex: 1 1 220px;
  border-radius: 999px;
  padding-left: 1.1rem;
}
.signup-row .btn { flex: 0 0 auto; }

/* Social */
.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--white);
  color: var(--teal-deep);
  border: 2px solid var(--teal-deep);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}
.social-link:hover {
  background: var(--yellow);
  color: var(--ink);
  border-color: #D4A62E;
}
.social-link .soon {
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--coral);
  color: var(--white);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Footer */
.site-footer {
  background: #0F3F4A;
  color: var(--aqua);
  padding: 2rem 1.1rem;
  text-align: center;
  font-size: 0.92rem;
}
.site-footer strong { color: var(--yellow); }
.site-footer a { color: var(--yellow-soft); }
.preview-banner {
  background: var(--yellow);
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  letter-spacing: 0.02em;
}

/* Modal for order form */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 63, 74, 0.72);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--cream);
  border-radius: var(--radius);
  border: 3px solid var(--teal-deep);
  max-width: 520px;
  width: 100%;
  padding: 1.4rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  margin: auto;
}
.modal header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.modal h2 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--teal-deep);
  font-size: 1.45rem;
}
.modal-close {
  background: transparent;
  border: 2px solid var(--teal-deep);
  border-radius: 8px;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--teal-deep);
  line-height: 1;
}
.modal-close:focus-visible { outline: 3px solid var(--yellow); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bubble { animation: none; opacity: 0.25; }
  .btn:hover { transform: none; }
}

/* Launch polish */
.eyebrow {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin: 0 0 0.75rem;
}
.hero-logo-wrap {
  position: relative;
  justify-self: center;
}
.hero-logo {
  transition: transform 0.35s ease;
}
.hero-logo-wrap:hover .hero-logo,
.hero-logo-wrap:focus-within .hero-logo {
  transform: rotate(-2deg) scale(1.03);
}
.wink-spark {
  position: absolute;
  right: 8%;
  top: 18%;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--coral);
  background: var(--yellow);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 0 #D4A62E;
  opacity: 0;
  transform: scale(0.5) rotate(-12deg);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.hero-logo-wrap:hover .wink-spark,
.hero-logo-wrap:focus-within .wink-spark {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.brand-mark {
  transition: transform 0.2s ease;
}
.brand:hover .brand-mark {
  transform: rotate(-6deg);
}

.product-visual.mystery {
  background:
    radial-gradient(circle at 40% 35%, rgba(255,255,255,0.95), transparent 42%),
    linear-gradient(145deg, var(--aqua) 0%, var(--teal-deep) 100%);
  position: relative;
  overflow: hidden;
}
.product-visual.mystery .q {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.product-visual.mystery .tease-mini {
  position: absolute;
  bottom: 0.7rem;
  left: 0;
  right: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}
.product-card:hover .product-visual.mystery {
  filter: brightness(1.05);
}
.product-card:hover::before {
  animation: pop-bubble 0.6s ease;
}
@keyframes pop-bubble {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.product-meta.tease {
  font-style: italic;
  color: var(--teal-mid);
  min-height: 2.6em;
}
.suds-feature {
  position: relative;
}
.suds-feature::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  right: 8%;
  top: 1.2rem;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.7), rgba(162,220,227,0.2));
  border: 2px solid rgba(255,255,255,0.35);
  pointer-events: none;
}
.social-link {
  transition: transform 0.15s ease, background 0.15s ease;
}
.social-link:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo, .brand-mark, .wink-spark, .social-link, .product-card:hover::before {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .hero-logo-wrap:hover .wink-spark { opacity: 1; }
}
