/* Solane marketing site - shared styles
   Design tokens sourced from DESIGN.md */

:root {
  /* Color - light theme */
  --bg: #F7F1E8;
  --surface: #FDFAF4;
  --surface-alt: #EBDFCE;
  --text-primary: #3A322A;
  --text-secondary: #7C6F5F;
  --text-muted: #A99C89;
  --accent: #C07650;
  --accent-soft: #E7C9B4;
  --secondary-accent: #9DAA8F;
  --tertiary: #8FB0AB;
  --border: #E2D6C4;
  --overlay: rgba(58, 50, 42, 0.4);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, sans-serif;

  --text-caption: 0.75rem;
  --text-body: 1rem;
  --text-body-lg: 1.25rem;
  --text-title: 1.625rem;
  --text-heading: 2.125rem;
  --text-display: 2.75rem;
  --text-hero: 3.25rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-ambient: 0 8px 24px rgba(58, 50, 42, 0.08);

  /* Motion */
  --ease-calm: cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-soft: ease-out;
  --dur-calm: 450ms;
  --dur-soft: 250ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-display); }
h3 { font-size: var(--text-heading); }
h4 { font-size: var(--text-title); }

p {
  margin: 0 0 var(--space-4);
  color: var(--text-secondary);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---------- Header ---------- */

.site-header {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-title);
  color: var(--text-primary);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.main-nav {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-body);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-body);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-soft) var(--ease-soft), box-shadow var(--dur-soft) var(--ease-soft);
  min-height: 44px;
}

.btn-primary {
  background: var(--accent);
  color: var(--surface);
}

.btn-primary:hover {
  box-shadow: var(--shadow-ambient);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Store badges ---------- */

.store-badges {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  background: var(--text-primary);
  color: var(--surface);
  text-decoration: none;
  min-height: 44px;
}

.store-badge .store-badge-text {
  line-height: 1.2;
}

.store-badge .store-badge-eyebrow {
  display: block;
  font-size: var(--text-caption);
  opacity: 0.75;
}

.store-badge .store-badge-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.store-badge svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */

.hero {
  padding: var(--space-16) 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary-accent);
  margin-bottom: var(--space-4);
}

.hero h1 {
  margin-bottom: var(--space-4);
}

.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-body-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

/* ---------- Phone mockup ---------- */

.phone-mockup {
  position: relative;
  width: 260px;
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  background: var(--text-primary);
  border-radius: 40px;
  padding: 10px;
  box-shadow: var(--shadow-ambient);
}

.phone-mockup-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(160deg, var(--accent-soft), var(--surface-alt));
}

.phone-mockup-screen.grade-golden {
  background: linear-gradient(160deg, #E7C9B4, #C07650 120%);
}

.phone-mockup-screen.grade-linen {
  background: linear-gradient(160deg, #FDFAF4, #EBDFCE);
}

.phone-mockup-screen.grade-dusk {
  background: linear-gradient(160deg, #D9C3BC, #8FB0AB);
}

.phone-mockup-screen.grade-sage {
  background: linear-gradient(160deg, #C9D3BE, #9DAA8F);
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 18px;
  background: var(--text-primary);
  border-radius: var(--radius-pill);
  z-index: 2;
}

.phone-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-6);
  text-align: center;
}

.breathing-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid rgba(253, 250, 244, 0.8);
  margin-bottom: var(--space-4);
}

.phone-caption {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--surface);
  font-size: var(--text-body);
}

/* ---------- Feature sections ---------- */

.feature {
  padding: var(--space-16) 0;
}

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

.feature.reverse .container {
  direction: rtl;
}

.feature.reverse .container > * {
  direction: ltr;
}

.feature-label {
  display: inline-block;
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: var(--space-3);
}

.feature-visual {
  display: flex;
  justify-content: center;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-ambient);
  border: 1px solid var(--border);
}

/* ---------- Languages band ---------- */

.band {
  padding: var(--space-16) 0;
  background: var(--surface-alt);
  text-align: center;
}

.band h2 {
  font-size: var(--text-heading);
}

.band p {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-body);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  color: var(--text-muted);
  font-size: var(--text-caption);
}

/* ---------- Legal pages ---------- */

.legal-main {
  padding: var(--space-16) 0 var(--space-16);
}

.legal-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.legal-wrap h1 {
  font-size: var(--text-display);
}

.legal-updated {
  color: var(--text-muted);
  font-size: var(--text-caption);
  margin-bottom: var(--space-8);
}

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-12);
}

.legal-toc h2 {
  font-size: var(--text-title);
  margin-bottom: var(--space-3);
}

.legal-toc ol {
  margin: 0;
  padding-left: var(--space-6);
  color: var(--text-secondary);
}

.legal-toc li {
  margin-bottom: var(--space-2);
}

.legal-toc a {
  color: var(--text-secondary);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--accent);
}

.legal-wrap section {
  margin-bottom: var(--space-12);
  scroll-margin-top: var(--space-8);
}

.legal-wrap h2 {
  font-size: var(--text-heading);
  border-top: 0.75pt solid var(--border);
  padding-top: var(--space-8);
}

.legal-wrap section:first-of-type h2 {
  border-top: none;
  padding-top: 0;
}

.legal-wrap h3 {
  font-size: var(--text-title);
}

.legal-wrap ul,
.legal-wrap ol {
  color: var(--text-secondary);
  padding-left: var(--space-6);
}

.legal-wrap li {
  margin-bottom: var(--space-2);
}

.legal-wrap .placeholder {
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0 4px;
  border-radius: 4px;
}

.processor-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
}

.processor-table th,
.processor-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-secondary);
  vertical-align: top;
}

.processor-table th {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- Contact form ---------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 560px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-field label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  min-height: 44px;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form .btn {
  align-self: flex-start;
}

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-6) 0;
}

.faq-item h3 {
  font-size: var(--text-title);
  margin-bottom: var(--space-3);
}

.faq-item ol,
.faq-item ul {
  color: var(--text-secondary);
}

/* ---------- Utility ---------- */

.text-center {
  text-align: center;
}

.mt-8 {
  margin-top: var(--space-8);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .container,
  .feature .container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .feature.reverse .container {
    direction: ltr;
  }

  .feature-visual {
    order: -1;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
}

@media (max-width: 640px) {
  .main-nav {
    display: none;
  }

  .site-header .container {
    flex-wrap: wrap;
  }

  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.75rem; }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
