/* Sydhavet — site stylesheet
   One file, no build step. Sections:
   1. Fonts  2. Tokens  3. Base  4. Themes  5. Layout  6. Type  7. Components
   8. Header/footer  9. Motion  10. Page-specific (waves, compass, heroes) */

/* 1. Fonts (self-hosted, SIL OFL — see /assets/fonts/LICENSE-fonts.txt) */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 500; font-display: swap; src: url("/assets/fonts/fraunces-roman.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 400; font-display: swap; src: url("/assets/fonts/fraunces-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/assets/fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); }

/* 2. Tokens */
:root {
  --navy: #0E1F2A;
  --navy-deep: #132A38;
  --navy-night: #0B1922;
  --paper: #F3F1EA;
  --paper-light: #FBFAF6;
  --mist: #EEF1EC;
  --teal-deep: #173F3E;

  --coral: #E8875A;   /* Sydhavet Software accent */
  --teal: #1F6F6B;    /* Sydhavet Partners accent */
  --accent: var(--coral);
  --partners-accent: var(--teal);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --container: 1240px;
  --gutter: 24px;
}
.accent-partners { --accent: var(--teal); }

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); background: var(--navy); color: var(--mist); line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.page-paper { background: var(--paper); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 12px 18px; border-radius: 99px; background: var(--mist); color: var(--navy); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 4. Themes: each section sets its own colours through these variables */
.theme-dark, .theme-deep, .theme-night {
  --fg: var(--mist); --fg-lead: #C9D5D9; --fg-muted: #A9BCC4; --fg-eyebrow: #9FB3BC; --fg-dim: #8CA2AC;
  --rule: #2A4352; --line: #3A5462; --link: var(--mist); --link-hover: #FFFFFF; --ghost-hover: rgba(238,241,236,.08);
  color: var(--fg);
}
.theme-dark { background: var(--navy); }
.theme-deep { background: var(--navy-deep); }
.theme-night { background: var(--navy-night); }
.theme-paper, .theme-paper-light {
  --fg: var(--navy); --fg-lead: #2A3E48; --fg-muted: #3D525C; --fg-eyebrow: #3D525C; --fg-dim: #55676F;
  --rule: #C9C6BA; --line: #A9A798; --link: var(--navy); --link-hover: var(--accent); --ghost-hover: rgba(14,31,42,.06);
  color: var(--fg);
}
.theme-paper { background: var(--paper); }
.theme-paper-light { background: var(--paper-light); }
.theme-teal {
  --fg: var(--mist); --fg-lead: #D5E3E0; --fg-muted: #B7CFCB; --fg-eyebrow: #B7CFCB;
  --rule: #2F5F5C; --line: #2F5F5C; --link: var(--mist); --link-hover: #FFFFFF;
  background: var(--teal-deep); color: var(--fg);
}

/* 5. Layout */
.wrap { max-width: var(--container); margin: 0 auto; }
.section { padding: 120px var(--gutter); }
.section--tight-top { padding-top: 0; }
.stack { display: flex; flex-direction: column; }
.stack-24 { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.stack-28 { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 64px; }
.split--wide-gap { gap: 28px 80px; align-items: start; }
.split--centered { gap: 56px 80px; align-items: center; }
.cols-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.relative { position: relative; }

/* 6. Type */
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-eyebrow); }
.eyebrow--accent { color: var(--accent); }
.display { font-family: var(--font-display); font-weight: 300; letter-spacing: -.025em; text-wrap: balance; }
.display em, .h2 em { font-style: italic; color: var(--accent); }
.h1 { font-family: var(--font-display); font-weight: 300; letter-spacing: -.025em; text-wrap: balance; }
.h2 { font-family: var(--font-display); font-weight: 300; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.h2--regular { font-weight: 400; }
.h2--xl { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.04; letter-spacing: -.025em; max-width: 820px; }
.h2--sm { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -.015em; }
.h2--md { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; letter-spacing: -.015em; max-width: 720px; }
.h3 { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.25; }
.h3--lg { font-size: 28px; letter-spacing: -.01em; }
.lead { font-size: 19px; line-height: 1.6; color: var(--fg-lead); text-wrap: pretty; }
.body-lg { font-size: 18px; line-height: 1.7; color: var(--fg-lead); text-wrap: pretty; }
.body { font-size: 17px; line-height: 1.65; color: var(--fg-lead); text-wrap: pretty; }
.body-muted { font-size: 17px; line-height: 1.6; color: var(--fg-muted); }
.text { font-size: 16px; line-height: 1.65; color: var(--fg-muted); }
.note { font-size: 16px; color: var(--fg-muted); padding-top: 12px; }
.mono-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.measure-440 { max-width: 440px; } .measure-460 { max-width: 460px; } .measure-520 { max-width: 520px; }
.measure-540 { max-width: 540px; } .measure-600 { max-width: 600px; } .measure-620 { max-width: 620px; } .measure-640 { max-width: 640px; }
.pill { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid #8A8776; border-radius: 99px; padding: 4px 10px; color: var(--fg-muted); }

/* 7. Components */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 99px; font-weight: 600; font-size: 16px; text-decoration: none; transition: filter .15s, background-color .15s; }
.btn svg { flex: none; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; gap: 12px; }
.btn--primary { background: var(--accent); color: var(--btn-ink, var(--navy)); }
.btn--primary:hover { color: var(--btn-ink, var(--navy)); filter: brightness(1.08); }
.btn--on-light { --btn-ink: #FFFFFF; }
.btn--on-light:hover { filter: brightness(1.12); }
.btn--mist { background: var(--mist); color: var(--navy); }
.btn--mist:hover { color: var(--navy); filter: brightness(1.08); }
.btn--ghost { border: 1px solid var(--line); color: var(--fg); font-weight: 500; }
.btn--ghost:hover { color: var(--fg); background: var(--ghost-hover); }
.btn--sm { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 28px 0; border-top: 1px solid var(--rule); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step__mark { font-family: var(--font-mono); font-size: 13px; color: var(--accent); padding-top: 6px; }
.steps--quiet .step__mark { color: var(--fg-muted); }
.step__body { display: flex; flex-direction: column; gap: 8px; }
.step__body p { font-size: 16px; line-height: 1.6; color: var(--fg-muted); }

.rule-top { border-top: 1px solid var(--rule); }

/* 8. Header and footer */
.site-header { position: relative; z-index: 3; padding: 28px var(--gutter) 0; }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fg); }
.brand:hover { color: var(--fg); }
.brand__ring { stroke: var(--fg); }
.brand__name { display: flex; align-items: baseline; gap: 8px; }
.brand__word { font-family: var(--font-display); font-size: 24px; font-weight: 400; letter-spacing: -.01em; }
.brand__sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; }
.site-nav a { text-decoration: none; padding: 10px 0; color: var(--fg); }
.site-nav a:hover { color: var(--link-hover); }
.site-nav a[aria-current="page"] { border-bottom: 1px solid var(--accent); }
.site-nav .site-nav__cta { padding: 10px 18px; border: 1px solid var(--line); border-radius: 99px; }

.site-footer { padding: 36px var(--gutter); border-top: 1px solid #1E3542; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; font-size: 14px; color: var(--fg-dim); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer__links a { color: #C9D5D9; text-decoration: none; padding: 12px 0; }
.site-footer__links a:hover { color: #FFFFFF; }
.site-footer__cvr { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }

/* 9. Motion */
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes driftback { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes beacon { 0%, 84%, 100% { opacity: .12; transform: scale(.8); } 88% { opacity: 1; transform: scale(1.25); } 92% { opacity: .5; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: .8; } }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes spinback { from { transform: rotate(360deg); } to { transform: rotate(0); } }
@keyframes sway { from { transform: rotate(-9deg); } to { transform: rotate(11deg); } }
.r1 { animation: rise .9s ease-out .1s both; }
.r2 { animation: rise .9s ease-out .3s both; }
.r3 { animation: rise .9s ease-out .5s both; }
.r4 { animation: rise .9s ease-out .7s both; }
.beacon { animation: beacon 6s ease-in-out infinite; }
.glow { animation: glow 14s ease-in-out infinite; }
.spin { animation: spin 160s linear infinite; }
.spinback { animation: spinback 220s linear infinite; }
.sway { animation: sway 9s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 10. Waves: a strip is twice the viewport wide and drifts by half its width */
.waves { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; pointer-events: none; }
.wave { position: absolute; left: 0; width: 200%; }
.wave svg { width: 100%; height: 100%; }
.wave path { fill: none; stroke: var(--mist); vector-effect: non-scaling-stroke; }
.wave--accent path { stroke: var(--accent); }
.wave--partners path { stroke: var(--partners-accent); }
.wave path.wave__fill { stroke: none; }

/* Hero (shared) */
.hero { position: relative; overflow: hidden; margin-top: -90px; padding-left: var(--gutter); padding-right: var(--gutter); }
.hero__content { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 32px; }
.hero__glow { position: absolute; left: 50%; width: 1400px; height: 520px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(232,135,90,.20), rgba(232,135,90,.05) 55%, rgba(14,31,42,0) 100%); pointer-events: none; }
.hero__horizon { position: absolute; left: 0; right: 0; bottom: 232px; height: 1px; background: linear-gradient(90deg, rgba(238,241,236,0), rgba(238,241,236,.28) 30%, rgba(238,241,236,.28) 70%, rgba(238,241,236,0)); }
.hero__beacon { position: absolute; right: 14%; bottom: 225px; width: 16px; height: 16px; }
.hero__beacon div { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 24px 6px var(--accent); }

/* Landing hero */
.hero--home { min-height: 720px; padding-top: 200px; padding-bottom: 290px; }
.hero--home .hero__content { gap: 30px; }
.hero--home .hero__glow { top: 320px; }
.hero--home .h1 { max-width: 1000px; font-size: clamp(40px, 5.8vw, 84px); line-height: 1.05; }
.hero--home .waves { height: 250px; }
.hero--home .wave:nth-child(1) { bottom: 170px; height: 46px; opacity: .26; animation: driftback 52s linear infinite; }
.hero--home .wave:nth-child(2) { bottom: 126px; height: 60px; opacity: .36; animation: drift 27s linear infinite; }
.hero--home .wave:nth-child(3) { bottom: 78px; height: 76px; opacity: .5; animation: driftback 34s linear infinite; }
.hero--home .wave:nth-child(4) { bottom: 24px; height: 96px; opacity: .6; animation: drift 20s linear infinite; }
.hero--home .wave:nth-child(5) { bottom: -40px; height: 120px; animation: drift 16s linear infinite; }
.hero--home .wave__fill { fill: var(--navy-deep); }
.hero--home .wave__crest { opacity: .7; }

/* Landing: the two doors */
.doors { padding: 24px var(--gutter) 120px; }
.doors__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: 24px; }
.door { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 22px; padding: 44px 44px 48px; border-radius: 6px; min-height: 560px; }
.door--partners { --accent: var(--teal); border: 1px solid var(--paper); }
.door--software { border: 1px solid var(--rule); }
.door__label { display: flex; align-items: center; gap: 12px; }
.door .h2 { font-size: clamp(36px, 4vw, 54px); line-height: 1.06; }
.door__list { display: flex; flex-direction: column; font-size: 16px; color: var(--fg); }
.door__list li { padding: 14px 0; border-top: 1px solid var(--rule); }
.door__list li:last-child { border-bottom: 1px solid var(--rule); }
.door__cta { position: relative; display: flex; padding-top: 6px; margin-bottom: 70px; }
.door__compass { position: absolute; right: -90px; bottom: -90px; width: 300px; height: 300px; pointer-events: none; opacity: .6; }
.door__compass > div { position: absolute; inset: 0; }
.door__compass .spin { animation-duration: 140s; }
.door .waves { height: 90px; opacity: .55; }
.door .wave { height: 40px; }
.door .wave:nth-child(1) { bottom: 34px; animation: drift 27s linear infinite; }
.door .wave:nth-child(2) { bottom: 6px; opacity: .6; animation: driftback 34s linear infinite; }
.door .wave path { stroke-width: 1; }
.door .wave--accent path { stroke-width: 1.3; }
@media (max-width: 560px) { .door { padding: 32px 24px 36px; min-height: 0; } }

/* Contact band with a single wave */
.contact { position: relative; overflow: hidden; padding: 120px var(--gutter) 140px; }
.contact .waves { height: 120px; opacity: .35; }
.contact .wave { bottom: 20px; height: 60px; animation: drift 27s linear infinite; }
.contact .wrap { position: relative; }

/* Partners hero with compass */
.hero--partners { min-height: 720px; padding-top: 220px; padding-bottom: 140px; }
.hero--partners .h1 { max-width: 940px; font-size: clamp(44px, 6.6vw, 98px); line-height: 1.03; }
.compass { position: absolute; right: -140px; top: 120px; width: 620px; height: 620px; pointer-events: none; opacity: .55; }
.compass > div { position: absolute; inset: 0; }
.compass svg, .door__compass svg { width: 100%; height: 100%; }
@media (max-width: 700px) { .compass { width: 420px; height: 420px; right: -200px; top: 90px; opacity: .3; } }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); border-top: 1px solid var(--rule); }
.service { display: flex; flex-direction: column; gap: 16px; padding: 36px 32px 8px 0; }
.section--bordered { border-top: 1px solid #DAD7CB; border-bottom: 1px solid #DAD7CB; }
.worked-with { padding: 72px var(--gutter); }
.worked-with__inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 24px 48px; }
.worked-with ul { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 56px; font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -.01em; color: var(--fg); }

/* Software hero */
.hero--software { min-height: 760px; padding-top: 210px; padding-bottom: 300px; }
.hero--software .hero__glow { top: 360px; }
.hero--software .h1 { max-width: 980px; font-size: clamp(46px, 7.2vw, 108px); line-height: 1.02; }
.hero--software .waves { height: 330px; }
.hero--software .wave:nth-child(1) { bottom: 250px; height: 40px; opacity: .22; animation: drift 38s linear infinite; }
.hero--software .wave:nth-child(2) { bottom: 205px; height: 50px; opacity: .28; animation: driftback 52s linear infinite; }
.hero--software .wave:nth-child(3) { bottom: 150px; height: 64px; opacity: .36; animation: drift 27s linear infinite; }
.hero--software .wave:nth-child(4) { bottom: 92px; height: 80px; opacity: .46; animation: driftback 34s linear infinite; }
.hero--software .wave:nth-child(5) { bottom: 30px; height: 100px; opacity: .6; animation: drift 20s linear infinite; }
.hero--software .wave:nth-child(6) { bottom: -40px; height: 120px; animation: drift 16s linear infinite; }
.hero--software .wave__fill, .hero--about .wave__fill { fill: var(--paper); }
.products { padding: 100px var(--gutter) 120px; }
.products__title { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.h2--products { font-weight: 400; }
.coming-soon { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; min-height: 260px; padding: 48px; border: 1px dashed #8A8776; border-radius: 4px; }
.coming-soon .h3 { max-width: 640px; }
@media (max-width: 560px) { .coming-soon { padding: 32px 24px; } }
.client-builds .split { gap: 24px 64px; align-items: start; padding-top: 72px; }

/* About */
.hero--about { margin-top: 0; padding-top: 140px; padding-bottom: 220px; }
.hero--about .hero__content { gap: 28px; }
.hero--about .h1 { max-width: 960px; font-size: clamp(42px, 6vw, 88px); line-height: 1.04; }
.hero--about .waves { height: 180px; }
.hero--about .wave:nth-child(1) { bottom: 110px; height: 44px; opacity: .25; animation: drift 40s linear infinite; }
.hero--about .wave:nth-child(2) { bottom: 56px; height: 64px; opacity: .45; animation: driftback 30s linear infinite; }
.hero--about .wave:nth-child(3) { bottom: -30px; height: 100px; animation: drift 22s linear infinite; }
.name-section { padding: 80px var(--gutter) 120px; }
.name-section .split { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 48px 80px; align-items: start; }
.name-section .eyebrow { color: #8A5A3C; }
.name-word { font-family: var(--font-display); font-weight: 300; font-size: clamp(56px, 8vw, 120px); line-height: 1; letter-spacing: -.03em; }
.name-ipa { font-family: var(--font-mono); font-size: 14px; color: var(--fg-muted); }
.name-body { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.portrait { display: block; aspect-ratio: 4 / 5; max-width: 480px; width: 100%; height: auto; object-fit: cover; object-position: 50% 30%; border-radius: 4px; background: var(--navy-deep); }
.founder .split { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.say-yes { display: flex; flex-direction: column; gap: 48px; padding-top: 80px; }
.say-yes .cols-3 > div { display: flex; flex-direction: column; gap: 12px; }
.cta-band { padding: 100px var(--gutter); }
.cta-band__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; }
.cta-band .h2 { max-width: 680px; }

/* Plain text pages (privacy, 404) */
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 20px; }
.prose h2 { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.2; margin-top: 24px; }
.prose p, .prose li { font-size: 17px; line-height: 1.7; color: var(--fg-lead); }
.prose ul { list-style: disc; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.page-simple { padding: 140px var(--gutter) 120px; }
.page-simple .h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.05; }

@media (max-width: 560px) {
  .section { padding-top: 88px; padding-bottom: 88px; }
  .section--tight-top { padding-top: 0; }
  .contact { padding-top: 88px; padding-bottom: 110px; }
}

/* Utilities and SVG colouring (SVGs use currentColor; colour is set here) */
.span-all { grid-column: 1 / -1; }
.gap-12 { gap: 12px; } .gap-48 { gap: 48px; } .gap-64 { gap: 64px; }
.brand__wave { stroke: var(--accent); }
.door__label svg, .door__compass, .compass { color: var(--accent); }
.hero--404 .wave__fill { fill: var(--navy-night); }
