/* ═══════════════════════════════════════════
   ySolves — styles.css
   Aesthetic: Light, sharp, warm
   ═══════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg-white: #ffffff;
  --bg-warm: #faf8f5;
  --bg-warm-alt: #f3efe9;
  --bg-dark: #0c1117;
  --bg-dark-subtle: #131a23;
  --text-primary: #1a1d23;
  --text-secondary: #4a5568;
  --text-tertiary: #8895a7;
  --text-light: #f8f5f0;
  --accent: #d4860b;
  --accent-light: #e9a73e;
  --accent-soft: rgba(212, 134, 11, 0.08);
  --accent-glow: rgba(212, 134, 11, 0.15);
  --navy: #1e2a3a;
  --border: rgba(12, 17, 23, 0.08);
  --border-strong: rgba(12, 17, 23, 0.14);
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --max-w: 1200px;
  --section-pad: clamp(80px, 12vw, 160px);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-white);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ── Utility ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ══════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.4s, padding 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav__logo .y-mark {
  color: var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1;
  margin-right: 1px;
}
.nav__links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav__links a:hover { color: var(--text-primary); }
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--bg-white) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em;
  background: var(--accent);
  padding: 8px 20px;
  clip-path: url(#squircle-btn-wide);
  transition: background 0.3s, transform 0.3s, filter 0.3s !important;
}
.nav__cta:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 12px var(--accent-glow));
}
.nav__cta::after { display: none !important; }

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.hero {
  background: var(--bg-warm);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--section-pad) 0;
}
.hero__motif {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 60vw;
  height: 120%;
  opacity: 0.035;
  pointer-events: none;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 80vw;
  line-height: 0.8;
  color: var(--accent);
  user-select: none;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.6;
}
.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}
.hero__tag::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--accent);
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
  color: var(--navy);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
}
.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.8;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 14px 32px;
  clip-path: url(#squircle-btn);
  transition: all 0.3s var(--ease-out);
  letter-spacing: 0.03em;
}
.btn--primary {
  background: var(--accent);
  color: var(--bg-white);
}
.btn--primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 20px var(--accent-glow));
}
.btn--ghost {
  background: rgba(12, 17, 23, 0.04);
  color: var(--text-secondary);
}
.btn--ghost:hover {
  background: rgba(12, 17, 23, 0.08);
  color: var(--text-primary);
}
.btn__arrow {
  transition: transform 0.3s;
}
.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1.2s forwards;
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ══════════════════════════════════════════
   SHARED SECTION STYLES
   ══════════════════════════════════════════ */
.section-header {
  margin-bottom: 64px;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  width: 20px;
  height: 1.5px;
  background: var(--accent);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--navy);
}
.section-title em {
  font-style: italic;
  color: var(--accent);
}

/* ══════════════════════════════════════════
   PRODUCTS
   ══════════════════════════════════════════ */
.products {
  padding: var(--section-pad) 0;
  background: var(--bg-white);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}
/* Subtle diagonal accent */
.products::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 1px;
  height: 600px;
  background: linear-gradient(to bottom, transparent, var(--accent-glow), transparent);
  transform: rotate(25deg);
  opacity: 0.5;
}

/* Product group labels */
.products__group {
  margin-top: 56px;
}
.products__group:first-of-type {
  margin-top: 0;
}
.products__group-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 16px;
}

/* Featured products — full-width rows */
.products__featured {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.product-featured {
  background: var(--bg-warm);
  padding: 48px;
  border-left: 3px solid transparent;
  clip-path: url(#squircle-card);
  transition: border-color 0.4s var(--ease-out), background 0.4s var(--ease-out);
}
.product-featured:hover {
  border-left-color: var(--accent);
  background: var(--bg-warm-alt);
}
.product-featured__content {
  max-width: 680px;
}
.product-featured__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.product-featured__name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--navy);
}
.product-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  clip-path: url(#squircle-badge);
  white-space: nowrap;
}
.product-badge--live {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}
.product-featured__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}
.product-featured__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.product-featured__highlights li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--accent-soft);
  padding: 4px 12px;
  clip-path: url(#squircle-badge);
}
.product-featured__links {
  display: flex;
  gap: 24px;
}
.product-featured__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.3s;
}
.product-featured__link:hover {
  gap: 12px;
}

/* Upcoming products — compact row */
.products__upcoming {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.products__upcoming-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.products__upcoming-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
a.product-upcoming {
  display: block;
  transition: opacity 0.3s;
}
a.product-upcoming:hover {
  opacity: 1;
}
.product-upcoming__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin-bottom: 6px;
}
.product-upcoming__desc {
  font-size: 0.88rem;
  color: var(--text-tertiary);
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   APPROACH
   ══════════════════════════════════════════ */
.approach {
  padding: var(--section-pad) 0;
  background: var(--bg-warm);
  position: relative;
}
.approach__list {
  border-top: 1px solid var(--border-strong);
}
.approach-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  align-items: baseline;
  padding: 40px 0;
  border-bottom: 1px solid var(--border-strong);
  transition: padding-left 0.4s var(--ease-out);
}
.approach-row:hover {
  padding-left: 16px;
}
.approach-row__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--navy);
  transition: color 0.3s;
}
.approach-row:hover .approach-row__title {
  color: var(--accent);
}
.approach-row__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 520px;
}

/* ══════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════ */
.about {
  padding: var(--section-pad) 0;
  background: var(--bg-white);
}
.about__layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: center;
}
.about__visual {
  position: relative;
}
.about__visual-block {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--bg-warm);
  clip-path: url(#squircle-card);
  position: relative;
  overflow: hidden;
}
.about__visual-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
}
.about__visual-block::after {
  content: 'y';
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20rem;
  color: var(--accent);
  opacity: 0.1;
  position: absolute;
  bottom: -40px;
  right: -20px;
  line-height: 1;
}
.about__visual-accent {
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 120px;
  height: 120px;
  border: 2px solid var(--accent);
  clip-path: url(#squircle-card);
  z-index: -1;
}
.about__content {}
.about__text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 20px;
}
.about__text:first-of-type {
  font-size: 1.15rem;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════
   CONTACT / CTA
   ══════════════════════════════════════════ */
.contact {
  padding: var(--section-pad) 0;
  background: var(--navy);
  color: var(--text-light);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center bottom, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}
.contact .section-label {
  justify-content: center;
}
.contact .section-title {
  color: var(--text-light);
}
.contact__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  color: var(--text-light);
}
.contact__title em {
  font-style: italic;
  color: var(--accent);
}
.contact__sub {
  font-size: 1.05rem;
  color: rgba(248, 245, 240, 0.6);
  margin-bottom: 40px;
  line-height: 1.7;
}
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bg-white);
  background: var(--accent);
  padding: 16px 36px;
  clip-path: url(#squircle-btn);
  transition: all 0.3s;
}
.contact__email:hover {
  background: var(--accent-light);
  filter: drop-shadow(0 8px 20px var(--accent-glow));
}

/* ══════════════════════════════════════════
   PRODUCT PAGES
   ══════════════════════════════════════════ */
.product-page {
  padding-top: calc(80px + var(--section-pad));
  padding-bottom: var(--section-pad);
  background: var(--bg-white);
}
.product-page__header {
  margin-bottom: 64px;
}
.product-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 32px;
  transition: color 0.3s;
}
.product-page__back:hover {
  color: var(--accent);
}
.product-page__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 12px;
}
.product-page__subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
}
.product-page__body {
  max-width: 720px;
}
.product-page__body p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 24px;
}
.product-page__section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin-top: 48px;
  margin-bottom: 16px;
}
.product-page__section-title:first-child {
  margin-top: 0;
}
.product-page__features {
  margin-bottom: 24px;
}
.product-page__features li {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
}
.product-page__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 2px;
  background: var(--accent);
}
.product-page__coming-soon-note {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-top: 32px;
}
.product-page__cta {
  margin-top: 40px;
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(248, 245, 240, 0.08);
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer__copy {
  font-size: 0.82rem;
  color: rgba(248, 245, 240, 0.4);
}
.footer__links {
  display: flex;
  gap: 24px;
}
.footer__links a {
  font-size: 0.82rem;
  color: rgba(248, 245, 240, 0.4);
  transition: color 0.3s;
}
.footer__links a:hover {
  color: var(--accent);
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .approach-row { gap: 32px; }
  .about__layout { grid-template-columns: 1fr; gap: 48px; }
  .about__visual { max-width: 400px; }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-white);
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 40px rgba(0,0,0,0.08);
  }
  .nav__links a { color: var(--text-secondary); }
  .nav__links a:hover { color: var(--text-primary); }
  .nav__links.open { transform: translateX(0); }
  .nav__toggle { display: flex; }

  .approach-row { grid-template-columns: 1fr; gap: 8px; padding: 28px 0; }
  .products__upcoming-list { grid-template-columns: 1fr; }
  .product-featured { padding: 32px 24px; }

  .hero__title { font-size: clamp(2.4rem, 8vw, 3.5rem); }

  .footer__inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .product-featured { padding: 24px 20px; }
}
