/* ============================================================================
   CANOPY — canopy.stellarappsllc.com
   Marketing + legal stylesheet. Ported from the iOS app's Canopy Design System
   (Coffee Cream LIGHT theme): warm latte ground, espresso ink, deep-teal
   interactive, bronze accent, Amiri for Arabic terms. Self-hosted fonts, no
   third-party requests. Interactive teal / bronze / tertiary deepened from the
   app tokens to clear WCAG 2.1 AA on the cream grounds for small web text.
   ========================================================================== */

/* ---- Fonts (self-hosted woff2) ---------------------------------------- */
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/CormorantGaramond-Regular.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/CormorantGaramond-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/CormorantGaramond-Bold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Amiri"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Amiri-Regular.woff2") format("woff2"); }

/* ---- Tokens (Coffee Cream · light) ------------------------------------ */
:root {
  --sw-cream: #F4ECD8;
  --sw-turquoise: #20C4D4;
  --sw-gold: #D9A441;
  --sw-terracotta: #C84A3A;
  --sw-emerald: #3DAA78;

  --text: #2B2117;
  --text-secondary: rgba(43, 33, 23, 0.70);   /* ~5.0:1 on cream — AA */
  --text-tertiary: #6B5F4F;                    /* ~4.6:1 on cream — AA (was rgba .45, failed) */

  --bg-root: #E8DCC4;
  --bg-default: #F4ECDA;
  --bg-secondary: #FBF5E9;
  --bg-tertiary: #FFFDF7;

  --secondary: #0A6A74;     /* deep teal — primary interactive (AA on cream) */
  --accent: #845410;        /* bronze/amber — emphasis & transliteration (AA on cream) */
  --warm: #B23A2A;
  --success: #2D7A4F;

  --button-bg: #0A6A74;
  --button-text: #FBF5E9;
  --link: #0A6A74;

  --border: rgba(43, 33, 23, 0.16);
  --card-border: rgba(43, 33, 23, 0.10);

  --ar-script: #0A6A74;     /* transliteration term */
  --ar-trans: #845410;      /* English meaning */
  --star-color: #C9A24B;    /* gilt flecks on parchment */

  --planet-sun:     #A8741A;
  --planet-moon:    #5E6B8C;
  --planet-mercury: #11827A;
  --planet-venus:   #BC3A64;
  --planet-mars:    #B01E33;
  --planet-jupiter: #2E50C0;
  --planet-saturn:  #463A82;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-arabic: "Amiri", "Scheherazade New", serif;

  --space-sm: 8px; --space-md: 12px; --space-lg: 16px; --space-xl: 20px;
  --space-2xl: 24px; --space-3xl: 32px; --space-4xl: 40px; --space-5xl: 48px;
  --radius-sm: 12px; --radius-md: 14px; --radius-card: 18px; --radius-lg: 24px; --radius-full: 9999px;

  --max-content: 1080px;
  --gutter: 26px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset / base ----------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--bg-root);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: var(--secondary); color: var(--bg-tertiary); }
a { color: var(--link); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }
img, svg { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--max-content); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Skip link — visible only on keyboard focus */
.skip-link {
  position: absolute; left: 16px; top: 12px; z-index: 100;
  padding: 0.6rem 1rem; background: var(--bg-tertiary); color: var(--text);
  border: 1px solid var(--secondary); border-radius: 8px; font-weight: 600;
  transform: translateY(-200%); transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---- Eyebrow / terms -------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
/* Two-tone Islamicate term: transliteration (teal) + meaning (bronze italic) */
.term { white-space: normal; }
.term-ar { color: var(--ar-script); font-style: italic; }
.term-en { color: var(--ar-trans); }
.arabic { font-family: var(--font-arabic); color: var(--ar-script); font-size: 1.15em; direction: rtl; unicode-bidi: isolate; }

/* ---- Header ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg-root) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.01em; }
.brand-tag { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); border-left: 1px solid var(--border); padding-left: 0.6rem; margin-left: 0.1rem; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); padding-block: 0.6rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--secondary); }
.nav-links a[aria-current="page"] { font-weight: 600; }
@media (max-width: 560px) { .brand-tag { display: none; } .nav-links { gap: 1rem; } }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0 1.5rem;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  border-radius: var(--radius-full); border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-primary { background: var(--button-bg); color: var(--button-text); box-shadow: 0 6px 18px rgba(10, 106, 116, 0.22); }
.btn-primary:hover { color: var(--button-text); background: #08555E; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--secondary); border-color: var(--secondary); }
.btn-ghost:hover { color: var(--button-text); background: var(--secondary); }
.btn:focus-visible { border-radius: var(--radius-full); }

/* "Coming soon" status — an honest status indicator, NOT a faux App Store badge */
.status-pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 1.05rem; border-radius: var(--radius-full);
  background: var(--bg-tertiary); border: 1px solid var(--card-border);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); flex: none; }

/* ---- Hero ------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero sw-starfield { position: absolute; inset: 0; z-index: 0; }
.hero::after { /* soft radial glow behind the mark */
  content: ""; position: absolute; top: 30%; left: 50%; transform: translate(-50%,-50%);
  width: min(680px, 90vw); aspect-ratio: 1; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(10,106,116,0.10) 0%, transparent 62%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 720px; margin: 0 auto; }
.hero-mark { width: clamp(108px, 22vw, 150px); height: auto; margin: 0 auto clamp(1.5rem, 4vw, 2.4rem); filter: drop-shadow(0 10px 26px rgba(43,33,23,0.16)); }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.06; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: 1.1rem;
}
.hero .lede {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.55;
  color: var(--text-secondary); max-width: 38ch; margin: 0 auto 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; }
.hero-note { margin-top: 1.1rem; font-size: 0.8rem; color: var(--text-tertiary); }

/* ---- Section scaffolding --------------------------------------------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-default); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.section-head { max-width: 640px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.section-head .eyebrow { margin-bottom: 0.9rem; }
.section-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.12; color: var(--text); }
.section-head p { margin-top: 1rem; color: var(--text-secondary); font-size: 1.05rem; }

/* ---- Feature grid ----------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(1rem, 2.4vw, 1.5rem); }
.feature {
  background: var(--bg-tertiary); border: 1px solid var(--card-border);
  border-radius: var(--radius-card); padding: var(--space-3xl);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(43,33,23,0.10); }
.feature h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.65rem; line-height: 1.2; color: var(--text); margin-bottom: 0.4rem; }
.feature .term { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.85rem; white-space: normal; }
.feature p { color: var(--text-secondary); font-size: 0.96rem; line-height: 1.6; }

/* ---- Tradition / sources --------------------------------------------- */
.sources { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; max-width: 720px; margin: 0 auto; }
.source-chip {
  font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
  padding: 0.5rem 0.95rem; border-radius: var(--radius-full);
  background: var(--bg-tertiary); border: 1px solid var(--card-border);
}
.source-chip strong { color: var(--accent); font-weight: 600; }

/* ---- CTA band --------------------------------------------------------- */
.cta { text-align: center; }
.cta h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--text); margin-bottom: 0.8rem; }
.cta p { color: var(--text-secondary); max-width: 46ch; margin: 0 auto 2rem; }

/* ---- Legal / prose (privacy + support) -------------------------------- */
.page-hero { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem); text-align: center; }
.page-hero .eyebrow { margin-bottom: 0.9rem; }
.page-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.08; color: var(--text); }
.page-hero .meta { margin-top: 0.9rem; font-size: 0.85rem; color: var(--text-secondary); }

.prose { max-width: 760px; margin: 0 auto; padding-bottom: clamp(3rem, 7vw, 5rem); }
.prose > section { margin-top: 2.6rem; }
.prose h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1.2;
  color: var(--text); margin-bottom: 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--card-border);
}
.prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; color: var(--text); margin: 1.6rem 0 0.5rem; }
.prose p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.7; }
.prose ul, .prose ol { color: var(--text-secondary); margin: 0 0 1rem 1.3rem; line-height: 1.7; }
.prose li { margin-bottom: 0.5rem; }
.prose li strong, .prose p strong { color: var(--text); font-weight: 600; }
.prose a { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(10,106,116,0.45); }

.callout {
  background: var(--bg-default); border: 1px solid var(--card-border); border-left: 3px solid var(--secondary);
  border-radius: var(--radius-md); padding: var(--space-xl) var(--space-2xl); margin: 1.4rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Definition-style FAQ */
.faq { margin-top: 1rem; }
.faq details { border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--bg-tertiary); margin-bottom: 0.8rem; overflow: hidden; }
.faq summary { cursor: pointer; padding: var(--space-lg) var(--space-xl); font-family: var(--font-body); font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+" / ""; font-size: 1.3rem; color: var(--secondary); font-weight: 400; transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 var(--space-xl) var(--space-lg); }
.faq .faq-body p { margin-bottom: 0.6rem; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { background: var(--bg-default); border-top: 1px solid var(--card-border); padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 0.8rem; }
.footer-brand p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.footer-col h3 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.9rem; font-family: var(--font-body); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a, .footer-col address, .footer-col li span { font-size: 0.875rem; color: var(--text-secondary); font-style: normal; line-height: 1.6; }
.footer-col a:hover { color: var(--secondary); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--card-border); }
.footer-bottom p, .footer-bottom a { font-size: 0.78rem; color: var(--text-secondary); }

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