/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {
  /* Surfaces */
  --color-bg:           #FAF9F7;
  --color-surface:      #FFFFFF;
  --color-surface-tint: #F1ECE3;
  --color-surface-dark: #1A1A1A;

  /* Text */
  --color-text:               #111111;
  --color-text-muted:         #5C5C5C;
  --color-text-on-dark:       #F2F2F7;
  --color-text-on-dark-muted: #AEAEB2;

  /* Accent */
  --color-accent:         #5E4B73;
  --color-accent-fg:      #FFFFFF;
  --color-accent-text:    #5E4B73;
  --color-accent-on-dark: #C4B5D9;

  /* Borders */
  --color-border: #E7E3DC;
  --color-button-disabled-border: #C8C8C3;

  /* Frame */
  --color-frame-shell:       #1C1C1E;
  --color-frame-screen:      #FAFAF9;
  --color-frame-outline:     transparent;

  /* Elevation (light — visible on warm surfaces) */
  --shadow-button:                 0 1px 3px rgba(17, 17, 17, 0.08), 0 1px 2px rgba(17, 17, 17, 0.06);
  --shadow-button-hover:           0 3px 10px rgba(17, 17, 17, 0.12), 0 1px 3px rgba(17, 17, 17, 0.08);
  --shadow-button-active:          0 1px 2px rgba(17, 17, 17, 0.1);
  --shadow-button-secondary-hover: 0 1px 3px rgba(17, 17, 17, 0.1);
  --shadow-frame:                  0 10px 30px rgba(17, 17, 17, 0.12);
  --shadow-frame-elevated:         0 16px 48px rgba(17, 17, 17, 0.16);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Type scale */
  --text-xs:   0.8125rem;  /*  13 px */
  --text-sm:   0.9375rem;  /*  15 px */
  --text-base: 1.0625rem;  /*  17 px */
  --text-lg:   1.25rem;    /*  20 px */
  --text-xl:   1.5rem;     /*  24 px */
  --text-2xl:  2rem;       /*  32 px */
  --text-3xl:  2.5rem;     /*  40 px */
  --text-4xl:  3.25rem;    /*  52 px */

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;

  /* Section vertical padding — 64 px mobile, 96 px desktop */
  --section-gap: 4rem;

  /* Layout */
  --max-layout:  960px;
  --page-padding: 1.5rem;
  --radius:       0.625rem; /* 10 px */
}

/* Desktop section gap and padding */
@media (min-width: 960px) {
  :root { --section-gap: 6rem; --page-padding: 2rem; }
}


/* ==========================================================================
   RESET
   ========================================================================== */

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


/* ==========================================================================
   BASE
   ========================================================================== */

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ==========================================================================
   FOCUS
   ========================================================================== */

:focus-visible {
  outline: 2.5px solid var(--color-accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn:focus-visible {
  border-radius: var(--radius);
}


/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-layout);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

.section {
  padding-block: var(--section-gap);
}

.hero {
  padding-block: calc(var(--section-gap) * 1.5);
}

.philosophy {
  background-color: var(--color-surface);
}

.featured {
  background-color: var(--color-surface-tint);
  border-top: 2px solid var(--color-accent-text);
}

.about {
  background-color: var(--color-surface);
}


/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2 {
  color: var(--color-text);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

p { color: var(--color-text); }

p + p { margin-top: var(--space-2); }

@media (min-width: 640px) {
  h1 { font-size: var(--text-4xl); }
}


/* ==========================================================================
   HERO
   ========================================================================== */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.hero-wordmark {
  font-size: clamp(3.25rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-border);
  text-align: right;
  display: none;
}

@media (min-width: 960px) {
  .hero-wordmark {
    display: block;
  }
}

.eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-text);
  margin-bottom: var(--space-1);
}

.hero-rule {
  display: block;
  width: 2.5rem;
  height: 2px;
  background-color: var(--color-accent-text);
  border: none;
  border-radius: 1px;
  margin-bottom: var(--space-3);
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  max-width: 560px;
}

.cta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .cta-row {
    flex-direction: row;
    align-items: center;
  }
}

.coming-soon-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.product-cta {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-accent-fg);
  border-color: var(--color-accent);
  cursor: pointer;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  opacity: 0.88;
  box-shadow: var(--shadow-button-hover);
}

.btn-primary:active {
  opacity: 1;
  box-shadow: var(--shadow-button-active);
}

.btn-primary[aria-disabled="true"] {
  background-color: var(--color-surface);
  color: var(--color-text-muted);
  border-color: var(--color-button-disabled-border);
  box-shadow: none;
  cursor: default;
}

.btn-primary[aria-disabled="true"]:hover,
.btn-primary[aria-disabled="true"]:active {
  opacity: 1;
  box-shadow: none;
}

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

.btn-secondary:hover {
  background-color: var(--color-accent);
  color: var(--color-accent-fg);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-button-secondary-hover);
}


/* ==========================================================================
   PHILOSOPHY — PRINCIPLES LIST
   ========================================================================== */

.principles {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin-top: var(--space-4);
}

.principles li {
  padding-block: var(--space-2);
  color: var(--color-text-muted);
}

.principles li:not(:first-child) {
  border-top: 1px solid var(--color-border);
}

.principles li strong {
  color: var(--color-text);
  font-weight: 600;
}

@media (min-width: 640px) {
  .principles {
    flex-direction: row;
    align-items: stretch;
  }

  .principles li {
    flex: 1;
    padding-inline: var(--space-3);
    padding-block: 0;
    border-top: 0;
  }

  .principles li:not(:first-child) {
    border-top: 0;
    border-left: 1px solid var(--color-border);
  }
}


/* ==========================================================================
   LISTS — feature / privacy-row
   ========================================================================== */

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: var(--space-3);
}

.feature-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.feature-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--color-accent-text);
  font-weight: 700;
}

.privacy-row {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: var(--space-2);
}

.privacy-row li {
  white-space: nowrap;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.privacy-row li::after {
  display: none;
}

@media (min-width: 640px) {
  .privacy-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
  }

  .privacy-row li::after {
    display: inline;
  }

  .privacy-row li:not(:last-child)::after {
    content: "·";
    margin-inline: 0.5rem;
    color: var(--color-text-muted);
  }
}


/* ==========================================================================
   PHONE FRAME
   ========================================================================== */

.phone-frame {
  aspect-ratio: 9 / 19.5;
  height: 280px;
  width: auto;
  justify-self: center;
  margin-inline: auto;
  background: var(--color-frame-shell);
  padding: 8px;
  border-radius: 36px;
  box-shadow: var(--shadow-frame), inset 0 0 0 1px var(--color-frame-outline);
}

.phone-frame__screen {
  width: 100%;
  height: 100%;
  background: var(--color-frame-screen);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.phone-frame__screen::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 18px;
  background: var(--color-frame-shell);
  border-radius: 12px;
}

@media (min-width: 960px) {
  .featured .phone-frame {
    height: 460px;
    box-shadow: var(--shadow-frame-elevated), inset 0 0 0 1px var(--color-frame-outline);
  }
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 960px) {
  .featured-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background-color: var(--color-surface-tint);
  border-top: 1px solid var(--color-border);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.footer p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

.footer-email:hover {
  opacity: 0.8;
}


/* ==========================================================================
   DARK MODE OVERRIDES
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:           #0F0F10;
    --color-surface:      #1C1C1E;
    --color-surface-tint: #222224;
    --color-surface-dark: #0A0A0B;
    --color-text:         #F2F2F7;
    --color-text-muted:   #AEAEB2;
    --color-border:       #2C2C2E;
    --color-accent-text:  #C4B5D9;
    --color-button-disabled-border: #3A3A3C;
    --color-frame-shell:       #2C2C2E;
    --color-frame-screen:      #1C1C1E;
    --color-frame-outline:     #3A3A3C;

    --shadow-button:                 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-button-hover:           0 3px 10px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-button-active:          0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-button-secondary-hover: 0 1px 3px rgba(0, 0, 0, 0.45);
    --shadow-frame:                  0 12px 36px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-frame-elevated:         0 20px 56px rgba(0, 0, 0, 0.65), 0 8px 20px rgba(0, 0, 0, 0.45);
  }
}
