/* ============================================
   TAOSTUDIO — style.css
   Vercel-inspired grid layout, dark mode only
   ============================================ */


/* ===========================================
   0. DESIGN TOKENS
   =========================================== */

:root {
  /* Colors */
  --color-black: #000000;
  --color-navy: #0A1628;
  --color-gold: #C4A55A;
  --color-turquoise: #00D4AA;
  --color-white: #FFFFFF;
  --color-gray-100: #EDEDED;
  --color-gray-400: #888888;
  --color-gray-600: #666666;
  --color-gray-900: #111111;

  /* Semantic */
  --color-bg-primary: var(--color-black);
  --color-bg-elevated: var(--color-gray-900);
  --color-bg-accent: var(--color-gold);
  --color-text-primary: var(--color-white);
  --color-text-secondary: var(--color-gray-400);
  --color-text-accent: var(--color-gold);
  --color-text-action: var(--color-turquoise);
  --color-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 40px;
  --text-5xl: 48px;
  --text-6xl: 64px;

  /* Line Heights */
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.7;

  /* Weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;

  /* Z-Index */
  --z-content: 2;
  --z-menu: 99;
  --z-nav: 100;
  --z-hamburger: 110;

  /* Layout */
  --max-width: 1100px;
  --nav-height: 64px;
  --gutter: 24px;
}


/* ===========================================
   1. RESET & BASE
   =========================================== */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.15;
  animation: grain 0.5s steps(1) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -3%); }
  20% { transform: translate(3%, 1%); }
  30% { transform: translate(-1%, -2%); }
  40% { transform: translate(2%, 3%); }
  50% { transform: translate(-3%, 1%); }
  60% { transform: translate(1%, -1%); }
  70% { transform: translate(-2%, 2%); }
  80% { transform: translate(3%, -3%); }
  90% { transform: translate(-1%, 2%); }
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

p { line-height: var(--leading-normal); }


/* ===========================================
   2. LAYOUT
   =========================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--sm { max-width: 600px; }
.container--md { max-width: 768px; }
.container--lg { max-width: var(--max-width); }


/* ===========================================
   3. NAVIGATION
   =========================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav__logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav--scrolled {
  background: rgba(0, 0, 0, 0.9);
}

.nav__logo-img {
  height: 16px;
  width: auto;
}

.nav__links { display: none; }

.nav__hamburger {
  position: absolute;
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  z-index: var(--z-hamburger);
}

.nav__hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-text-secondary);
  border-radius: 1px;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-6) var(--gutter);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: var(--z-menu);
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-menu__link {
  display: block;
  padding: var(--space-3) 0;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.mobile-menu__link:hover {
  color: var(--color-text-primary);
}


/* ===========================================
   4. BUTTONS & LINKS
   =========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  border: 1px solid transparent;
}

.btn:hover { opacity: 0.9; }

.btn--primary {
  background: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-gray-100);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  color: var(--color-text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn--dark {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-border);
}

.link-action {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}

.link-action:hover { color: var(--color-text-primary); }


/* ===========================================
   5. ACCORDION
   =========================================== */

.accordion__item {
  border-bottom: 1px solid var(--color-border);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) 0;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  width: 100%;
  text-align: left;
  gap: var(--space-4);
}

.accordion__trigger:hover {
  color: var(--color-text-secondary);
}

.accordion__icon {
  font-size: var(--text-lg);
  font-weight: 300;
  line-height: 1;
  transition: transform var(--transition-normal);
  flex-shrink: 0;
  color: var(--color-text-secondary);
}

.accordion__item.active .accordion__icon {
  transform: rotate(45deg);
}

.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion__item.active .accordion__panel {
  max-height: 500px;
}

.accordion__content {
  padding: 0 0 var(--space-5);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.accordion__content a {
  color: var(--color-text-action);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ===========================================
   6. MEDIA (Stamp, Badges)
   =========================================== */

.stamp {
  width: 360px;
  max-width: 80%;
  margin: 0 auto var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stamp img {
  width: 100%;
  height: auto;
}

.stamp--sm {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stamp--sm img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.store-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.store-badges__link {
  display: inline-block;
  height: 40px;
  transition: opacity var(--transition-fast);
}

.store-badges__link:hover { opacity: 0.8; }
.store-badges__link img { height: 40px; width: auto; }


/* ===========================================
   7. FOOTER
   =========================================== */

.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) var(--gutter) var(--space-8);
}

.footer .container--lg {
  max-width: var(--max-width);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__brand { display: inline-block; margin-bottom: var(--space-1); }
.footer__brand-img { height: 14px; width: auto; }

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.footer__email {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer__email:hover { color: var(--color-text-primary); }

.footer__col-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-1);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer__link:hover { color: var(--color-text-primary); }

.footer__back-to-top {
  display: block;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.footer__back-to-top:hover { color: var(--color-text-primary); }

.footer__divider {
  height: 1px;
  background: var(--color-border);
  margin-bottom: var(--space-6);
}

.footer__bottom { text-align: center; }

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}


/* ===========================================
   8. PAGE: Homepage Hero
   =========================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(196, 165, 90, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: var(--z-content);
  padding: var(--space-6);
  max-width: 720px;
}

.hero__title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
  background: linear-gradient(to bottom, #ffffff 30%, #999999);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--text-lg);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-10);
  letter-spacing: 0.02em;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}


/* ===========================================
   9. PAGE: Homepage Products
   =========================================== */

.products {
  padding: var(--space-20) var(--gutter);
  border-bottom: 1px solid var(--color-border);
}

.products__title {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-10);
}

.products__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-10) var(--space-8);
  background: var(--color-black);
  transition: background var(--transition-normal);
}

.product-card:hover {
  background: var(--color-bg-elevated);
}

.product-card__icon--text {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-primary);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}


.product-card__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.product-card__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.product-card__cta {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-action);
}


/* ===========================================
   10. PAGE: THOTH
   =========================================== */

.thoth-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-16)) var(--gutter) var(--space-16);
  background: #091428;
  border-bottom: 1px solid var(--color-border);
}

.thoth-hero__content {
  position: relative;
  z-index: var(--z-content);
  max-width: 500px;
}

.thoth-hero__title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.thoth-hero__tagline {
  font-size: var(--text-md);
  color: #C8AA6E;
  margin-bottom: var(--space-4);
}

.thoth-hero__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 420px;
  margin: 0 auto var(--space-8);
}

.thoth-hero__ready {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: #C8AA6E;
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.thoth-hero .store-badges {
  margin-bottom: var(--space-6);
}

.thoth-hero__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.thoth-hero__link {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.15);
}

.thoth-hero__link:hover { color: var(--color-text-primary); }

.thoth-hero__sep {
  color: var(--color-text-secondary);
  opacity: 0.4;
}


/* ===========================================
   11. THOTH: Features
   =========================================== */

.features {
  padding: var(--space-20) var(--gutter);
  background: #C8AA6E;
  border-bottom: 1px solid var(--color-border);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  max-width: var(--max-width);
  margin: 0 auto;
  background: #C8AA6E;
  border: 1px solid #C8AA6E;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature {
  text-align: center;
  padding: var(--space-10) var(--space-6);
  background: #091428;
}

.feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid #C8AA6E;
  font-size: var(--text-md);
  color: #C8AA6E;
  background: transparent;
}

.feature__title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.feature__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 280px;
  margin: 0 auto;
}


/* ===========================================
   12. THOTH: FAQ
   =========================================== */

.faq {
  padding: var(--space-20) var(--gutter);
  border-bottom: 1px solid var(--color-border);
}

.faq__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-10);
  text-align: center;
  letter-spacing: -0.02em;
}

.faq__help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-10);
}

.faq__help p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
}


/* ===========================================
   13. THOTH: CTA Banner
   =========================================== */

.cta-banner {
  padding: var(--space-16) var(--gutter);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.cta-banner__text {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}


/* ===========================================
   14. PAGE: Privacy
   =========================================== */

.privacy {
  padding: calc(var(--nav-height) + var(--space-16)) var(--gutter) var(--space-16);
  max-width: 768px;
  margin: 0 auto;
}

.privacy h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.privacy__date {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}

.privacy__intro {
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.privacy h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
}

.privacy h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.privacy p {
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

.privacy ul, .privacy ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.privacy ul { list-style: disc; }
.privacy ol { list-style: decimal; }

.privacy li {
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-1);
  color: var(--color-text-secondary);
}

.privacy strong { color: var(--color-text-primary); }

.privacy .link-action {
  font-size: inherit;
  font-weight: inherit;
  display: inline;
  color: var(--color-text-action);
}


/* ===========================================
   15. RESPONSIVE (768px)
   =========================================== */

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }

  .hero__title { font-size: var(--text-5xl); }
  .hero__subtitle { font-size: var(--text-xl); }
  .hero__actions { flex-direction: row; justify-content: center; }

  .stamp { width: 400px; }

  .thoth-hero__title { font-size: var(--text-4xl); }

  .store-badges__link { height: 44px; }
  .store-badges__link img { height: 44px; }

  /* Desktop Nav */
  .nav__links {
    display: flex;
    gap: var(--space-8);
    position: absolute;
    right: var(--gutter);
  }

  .nav__link {
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
  }

  .nav__link:hover { color: var(--color-text-primary); }

  .nav__hamburger,
  .mobile-menu {
    display: none !important;
  }

  /* Products: 2-col grid */
  .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Features: 3-col grid with borders */
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}


/* ===========================================
   16. RESPONSIVE (1024px)
   =========================================== */

@media (min-width: 1024px) {
  :root {
    --gutter: 48px;
  }
}


/* ===========================================
   17. ACCESSIBILITY
   =========================================== */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-text-action);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--color-text-action);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
