/* ============================================================================
   FYFEN — shared stylesheet for every page
   ----------------------------------------------------------------------------
   Plain CSS, no build step. Uses the Fyfen brand from the logo: teal, cream,
   amber, red and sand. To restyle the whole site, change the tokens in the
   :root block below. Every page links this one file.
   ============================================================================ */

/* ---------- Fonts (self-hosted, so no third-party font requests) ---------- */
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Design tokens (the Fyfen palette, from the logo) ---------- */
:root {
  --teal:  #163E3F;   /* main background / dark surfaces          */
  --cream: #F4ECDD;   /* text on dark, light surfaces              */
  --amber: #E0A93C;   /* accent: buttons, highlights, the "sun"    */
  --red:   #BF4630;   /* secondary accent, used sparingly          */
  --sand:  #D8CCB0;   /* light bands                               */

  --teal-line: #2A5C5C;  /* hairlines on dark (the logo's water lines) */
  --teal-deep: #102E2F;  /* layered panels on dark                     */
  --red-ink:   #93341F;  /* red for small text on light (AA contrast)  */

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body:    'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --section-pad: clamp(3.5rem, 8vw, 6.5rem);
  --container: 68rem;
  --narrow: 42rem;
  --radius: 18px;
}

/* ---------- Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--body);
  font-size: 1.0625rem;          /* 17px: comfortable on a phone */
  line-height: 1.65;
  color: var(--cream);
  background: var(--teal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--amber); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);   /* 16px gutter on phones */
}
.container--narrow { max-width: calc(var(--narrow) + 5rem); }

.skip-link {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--cream); color: var(--teal);
  padding: 0.5rem 1rem; border-radius: 8px; z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 7vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h3 { font-size: 1.25rem; }
h1 em, h2 em { font-style: normal; color: var(--amber); }   /* one amber word */

p + p { margin-top: 1em; }

/* Small uppercase label above a heading */
.eyebrow {
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}

.lede { font-size: clamp(1.05rem, 2.6vw, 1.3rem); opacity: 0.85; max-width: 44ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 600 1rem/1.2 var(--body);
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--amber); color: var(--teal); }
.btn--primary:hover { background: #ecb752; }
.btn--outline { background: transparent; color: var(--cream); border-color: var(--teal-line); }
.btn--outline:hover { border-color: var(--cream); }

/* ---------- Header ---------- */
.site-header { background: var(--teal); border-bottom: 1px solid var(--teal-line); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1;
  color: var(--cream); text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: clamp(0.9rem, 3vw, 1.6rem); flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--cream); opacity: 0.8;
  text-decoration: none; font-size: 0.95rem; font-weight: 500; padding-block: 0.4rem;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--amber); }
@media (max-width: 420px) { .nav .nav__extra { display: none; } }

/* ---------- The horizon divider (the site's signature element) ----------
   A thin sand curve echoing the logo's horizon, with the amber sun on it. */
.horizon { position: relative; width: 100%; height: 60px; }
.horizon svg { width: 100%; height: 100%; overflow: visible; }
.horizon path { fill: none; stroke: var(--sand); stroke-width: 2.5; opacity: 0.55; vector-effect: non-scaling-stroke; }
.horizon__sun {
  position: absolute; left: 50%; top: 31px;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: var(--amber);
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero__icon { width: 4.5rem; height: 4.5rem; border-radius: 1rem; margin-bottom: 1.5rem; }

.hero--center { text-align: center; }
.hero--center h1, .hero--center .lede { margin-inline: auto; }
.hero--center .hero__actions { justify-content: center; }
.hero__logo {
  width: clamp(150px, 34vw, 230px); height: auto;
  border-radius: 24px; margin: 0 auto 2rem;
}

.hero > .container > * { animation: rise .8s ease both; }
.hero > .container > *:nth-child(2) { animation-delay: .08s; }
.hero > .container > *:nth-child(3) { animation-delay: .16s; }
.hero > .container > *:nth-child(4) { animation-delay: .24s; }
.hero > .container > *:nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Section bands: teal, sand (light) and deep teal ---------- */
.section { padding-block: var(--section-pad); }
.section--light { background: var(--sand); color: var(--teal); }
.section--light .eyebrow { color: var(--red-ink); }
.section--light a { color: var(--teal); }
.section--deep { background: var(--teal-deep); }
.section__head { max-width: 36rem; margin-bottom: 2.5rem; }
.section__head p { margin-top: 1rem; font-size: 1.1rem; opacity: 0.85; }
.section__head .eyebrow { margin-top: 0; font-size: 0.8rem; opacity: 1; }

/* ---------- App cards (home). Add another <article class="app-card"> to list a new app. */
.app-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .app-grid { grid-template-columns: 1fr 1fr; } }

.app-card {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.1rem; align-items: start;
  background: var(--teal-deep);
  border: 1px solid rgba(224,169,60,0.55);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  transition: transform .18s ease, border-color .18s ease;
}
.app-card:hover { transform: translateY(-4px); border-color: var(--amber); }
.app-card__icon { width: 4.5rem; height: 4.5rem; border-radius: 1rem; }
.app-card h3 { font-size: 1.5rem; margin-top: 0.15rem; }
.app-card h3 a { color: var(--cream); text-decoration: none; }
.app-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); } /* whole card clickable */
.app-card p { opacity: 0.82; margin-top: 0.4rem; font-size: 1rem; }
.app-card__more { display: inline-block; margin-top: 0.9rem; font-weight: 600; color: var(--amber); font-size: 0.95rem; }

.tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  color: var(--sand); border: 1px solid var(--teal-line);
}
.app-card .tag { margin-bottom: 0.4rem; }

/* Muted "more to come" slot */
.app-card--empty {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: transparent; border: 1px dashed var(--teal-line);
  min-height: 8rem; font-size: 0.98rem; opacity: 0.72;
}
.app-card--empty:hover { transform: none; border-color: var(--teal-line); }

/* ---------- About ---------- */
.about { display: grid; gap: 2rem; }
@media (min-width: 820px) { .about { grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start; } }
.about__text p { font-size: clamp(1.08rem, 2.3vw, 1.25rem); line-height: 1.7; max-width: 46ch; }
.about__text p + p { margin-top: 1.3rem; }
.about__map {
  width: 100%; max-width: 22rem; height: auto;
  border-radius: var(--radius); margin-top: 2rem;
}

/* ---------- Contact ---------- */
.contact-email {
  display: inline-block;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.5rem, 6vw, 2.4rem);
  word-break: break-word;
  margin-top: 0.75rem;
  color: var(--amber);
}

/* ---------- Skerry: positioning line ---------- */
.positioning {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1.25;
  max-width: 24ch;
}
.section__head .positioning { margin-top: 0; opacity: 1; font-size: clamp(1.45rem, 4vw, 2.1rem); }
.positioning span { color: var(--amber); }

/* ---------- Skerry: features (full-width rows, like the old "steps") ---------- */
.features { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--teal-line); }
@media (min-width: 760px) { .features { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.feature {
  display: grid; grid-template-columns: 2.25rem 1fr; gap: 1rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--teal-line);
}
.feature svg { width: 2.25rem; height: 2.25rem; color: var(--amber); }
.feature h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.feature p { opacity: 0.82; font-size: 1rem; }
.features-label { margin-top: 0; }

/* ---------- Skerry: screenshot placeholders ---------- */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11.5rem, 1fr);
  gap: 1rem; overflow-x: auto; padding-bottom: 0.75rem; scroll-snap-type: x mandatory;
}
.shot {
  scroll-snap-align: start;
  aspect-ratio: 9 / 19;
  border-radius: 1.6rem;
  border: 2px dashed var(--teal-line);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 1rem;
  font-size: 0.85rem; color: var(--sand);
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}
/* When real screenshots arrive, put an <img> inside .shot and it fills the frame */
.shot img { width: 100%; height: 100%; object-fit: cover; border-radius: 1.4rem; }
.shot:has(img) { border: 0; padding: 0; }

/* ---------- Skerry: early access (the old site's pill form) ---------- */
.signup { max-width: 36rem; }
.signup label { display: block; font-weight: 600; margin-bottom: 0.6rem; }
.signup__row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.signup input[type="email"] {
  flex: 1 1 14rem; min-width: 0;
  font: 400 1rem/1.2 var(--body);
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--teal-line);
  background: var(--teal-deep);
  color: var(--cream);
}
.signup input[type="email"]::placeholder { color: rgba(244,236,221,0.5); }
.signup input[type="email"]:focus-visible { outline: none; border-color: var(--amber); }
.signup .btn { flex: 0 0 auto; }
.signup__consent { margin-top: 0.9rem; font-size: 0.95rem; opacity: 0.8; }
.signup__status { margin-top: 0.75rem; font-weight: 600; min-height: 1.4em; }
.signup__status[data-state="ok"] { color: var(--amber); }
.signup__status[data-state="error"] { color: #F0A08F; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; } /* spam trap */

.store-badge { margin-top: 1.5rem; }
.store-badge img { height: 56px; width: auto; }

/* ---------- FAQ (on a sand band) ---------- */
.faq { max-width: var(--narrow); border-top: 1px solid rgba(22,62,63,0.25); }
.faq details { border-bottom: 1px solid rgba(22,62,63,0.25); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.15rem 2.25rem 1.15rem 0;
  font-family: var(--display); font-weight: 600; font-size: 1.2rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
  font-family: var(--body); font-weight: 400; font-size: 1.6rem; color: var(--red-ink);
}
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 0 1.2rem; opacity: 0.9; max-width: 60ch; }

/* ---------- Safety note (a cream card with a red edge) ---------- */
.safety {
  display: grid; grid-template-columns: 2rem 1fr; gap: 0.9rem;
  background: var(--cream); color: var(--teal);
  border-left: 5px solid var(--red);
  border-radius: 0 16px 16px 0;
  padding: 1.4rem 1.6rem;
  max-width: var(--narrow);
}
.safety svg { width: 2rem; height: 2rem; color: var(--red); }
.safety strong { color: var(--red-ink); }
.safety p { font-size: 1rem; }
.safety a { color: var(--teal); }
@media (max-width: 480px) { .safety { grid-template-columns: 1fr; gap: 0.6rem; } }

/* ---------- Legal and other text pages: cream paper for long reading ---------- */
.page-head { padding-block: clamp(2.5rem, 7vw, 4rem); }
.page-head h1 { font-size: clamp(2rem, 6vw, 3rem); }
.page-head p { opacity: 0.8; margin-top: 0.6rem; }

.draft-banner {
  background: var(--amber); color: var(--teal);
  font-size: 0.95rem; padding-block: 0.7rem;
}
.draft-banner strong { letter-spacing: 0.06em; }

.prose-wrap { background: var(--cream); color: var(--teal); }
.prose { padding-block: clamp(2.25rem, 6vw, 4rem); }
.prose > * { max-width: var(--narrow); }
.prose a { color: var(--teal); }
.prose h2 { font-size: clamp(1.35rem, 3.5vw, 1.7rem); margin: 2.4rem 0 0.7rem; }
.prose h3 { margin: 1.6rem 0 0.4rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin-top: 0.7rem; }
.prose li + li { margin-top: 0.35rem; }
.prose ul + p { margin-top: 1em; }
.prose .safety { margin-block: 1.5rem; background: #FBF6EC; }
.prose table { border-collapse: collapse; width: 100%; margin-top: 0.9rem; font-size: 0.97rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--sand); }
.prose th { font-weight: 600; }
.meta { font-size: 0.95rem; opacity: 0.85; }

/* Square-bracket placeholders stand out so none slip through to launch */
.ph { background: #F6E7B5; color: #4A3B07; padding: 0 0.25em; border-radius: 3px; font-weight: 500; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.notfound .hero__logo { width: 120px; }
.notfound .lede { margin-inline: auto; }
.notfound .hero__actions { justify-content: center; }

/* ---------- Footer (the company details are a legal requirement) ---------- */
.site-footer {
  background: var(--teal-deep);
  border-top: 1px solid var(--teal-line);
  font-size: 0.92rem;
  padding-block: 2.75rem 2.25rem;
}
.site-footer, .site-footer p { color: rgba(244,236,221,0.78); }
.site-footer a { color: var(--amber); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer__grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr; align-items: end; } }
.footer__brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 600; font-size: 1.35rem; color: var(--cream) !important;
  margin-bottom: 0.75rem;
}
.footer__brand img { width: 34px; height: 34px; border-radius: 8px; }
.footer__company p + p { margin-top: 0.2rem; }
.footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
@media (min-width: 760px) { .footer__links { justify-content: flex-end; } }
.footer__copy { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--teal-line); }
