/* GoSailGlobal LLC — mobile-first stylesheet
   Type scale (5 sizes): 14 small / 17 body / 21 lead / h2 / display */

:root {
  --paper: #eef1f2;
  --panel: #e3e9eb;
  --ink: #0f2a43;
  --ink-soft: #4a5d70;
  --accent: #d24f26; /* logo and drawing only, never text */
  --sea: #257074;    /* drawing only */

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --fs-small: 14px;
  --fs-body: 17px;
  --fs-lead: 21px;
  --fs-h2: clamp(34px, 5vw, 58px);
  --fs-display: clamp(44px, 7.5vw, 96px);

  --wrap: 1120px;
  --gutter: 20px;
  --section: 72px;
  color-scheme: light dark;
}

@media (min-width: 720px) {
  :root { --gutter: 40px; --section: 104px; }
}

@media (min-width: 1100px) {
  :root { --section: 128px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1622;
    --panel: #13253a;
    --ink: #efe7d6;
    --ink-soft: #a7b4c1;
    --accent: #f07a4f;
    --sea: #63b6b4;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
svg { display: block; max-width: 100%; }
p { margin: 0; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus { left: 12px; }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-display); line-height: 1; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-lead); line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }

/* ---------- header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  padding-block: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; }
.wordmark { font-family: var(--serif); font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.01em; }
.wordmark span { font-style: italic; font-weight: 400; color: var(--accent); }

.site-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-nav a { display: inline-block; padding-block: 12px; font-size: var(--fs-small); font-weight: 500; text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- actions ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 24px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-body);
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.1s ease;
}
.btn:active { transform: scale(0.97); }

.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

@media (hover: hover) {
  a:hover { text-decoration-thickness: 2px; }
  .site-nav a:hover { text-decoration: underline; }
  .btn:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
}

/* ---------- hero ---------- */

.hero { padding-block: 40px var(--section); }
.hero .lede { margin-top: 24px; max-width: 32em; font-size: var(--fs-lead); line-height: 1.45; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; }

/* the drawing scales down ~3x on phones, so strokes and the boat start heavier */
.voyage { width: 100%; height: auto; margin-top: 64px; overflow: visible; }
.voyage .route { fill: none; stroke: var(--sea); stroke-width: 6; stroke-dasharray: 6 24; stroke-linecap: round; }
.voyage .wp { fill: var(--paper); stroke: var(--ink); stroke-width: 4; r: 14px; }
.voyage .ship { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(2.2); }
.voyage .sail-main { fill: var(--accent); }
.voyage .sail-jib,
.voyage .hull { fill: var(--ink); }

@media (min-width: 720px) {
  .hero { padding-top: 72px; }
  .voyage { margin-top: 72px; }
  .voyage .route { stroke-width: 2; stroke-dasharray: 2 9; }
  .voyage .wp { stroke-width: 1.5; r: 6px; }
  .voyage .ship { transform: none; }
}

/* ---------- bands ---------- */

.band { padding-block: var(--section); }
.band--panel { background: var(--panel); }
.section-title { margin-bottom: 40px; }

/* services: rows, first one leads */
.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.services li { display: grid; gap: 8px; }
.services p { max-width: 36em; }

@media (min-width: 720px) {
  .section-title { margin-bottom: 56px; }
  .services { gap: 40px; }
  .services li { grid-template-columns: 1fr 2fr; gap: 32px; align-items: baseline; }
}

/* company facts */
.facts { margin: 0; display: grid; }
.facts div { display: grid; gap: 2px; padding-block: 14px; }
.facts dt { font-size: var(--fs-small); color: var(--ink-soft); }
.facts dd { margin: 0; font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.35; overflow-wrap: anywhere; }

@media (min-width: 720px) {
  .facts div { grid-template-columns: 11em 1fr; gap: 16px; align-items: baseline; }
}

@media (min-width: 1100px) {
  .facts { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .facts div { grid-template-columns: 9em 1fr; }
}

/* write-to-us block: inverted surface */
.signal-wrap { padding-bottom: var(--section); }
.signal { background: var(--ink); color: var(--paper); padding: 40px 24px; }
.signal a { color: var(--paper); }
.signal :focus-visible { outline-color: currentColor; }
.signal .email-lead { display: inline-block; margin-top: 16px; font-family: var(--serif); font-size: var(--fs-lead); overflow-wrap: anywhere; }
.signal p { margin-top: 16px; }

@media (min-width: 720px) {
  .signal { padding: 64px; }
  .signal .email-lead { font-size: var(--fs-h2); }
}

/* ---------- subpages ---------- */

.page-head { padding-block: 40px 32px; }
.page-head h1 { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.02em; }
.page-head .meta { margin-top: 12px; font-size: var(--fs-small); color: var(--ink-soft); }

@media (min-width: 720px) {
  .page-head { padding-block: 72px 48px; }
}

.prose-layout { display: grid; gap: 32px; padding-bottom: var(--section); }
.toc { font-size: var(--fs-small); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding-block: 6px; color: var(--ink-soft); text-decoration: none; }
@media (hover: hover) { .toc a:hover { color: var(--ink); text-decoration: underline; } }

@media (min-width: 960px) {
  .prose-layout { grid-template-columns: 14em 1fr; gap: 64px; }
  .toc { position: sticky; top: 24px; align-self: start; }
}

.prose { max-width: 65ch; }
.prose h2 { font-size: var(--fs-lead); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; margin: 40px 0 10px; scroll-margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-size: var(--fs-body); font-weight: 600; letter-spacing: 0; margin: 20px 0 4px; }
.prose p,
.prose ul { margin: 0 0 14px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose address { font-style: normal; }

/* contact page */
.contact-lead { padding-bottom: 48px; }
.contact-lead .label { font-size: var(--fs-small); color: var(--ink-soft); }
.contact-lead .email-lead { display: inline-block; margin-top: 8px; font-family: var(--serif); font-size: var(--fs-lead); overflow-wrap: anywhere; }
.contact-lead p { margin-top: 12px; }

.contact-more { padding-block: 40px var(--section); background: var(--panel); }
.contact-more .wrap { display: grid; gap: 28px; }
.contact-more h2 { font-family: var(--sans); font-size: var(--fs-small); font-weight: 500; letter-spacing: 0; color: var(--ink-soft); margin-bottom: 6px; }
.contact-more address { font-style: normal; }
.contact-more address + p { margin-top: 8px; color: var(--ink-soft); }

@media (min-width: 720px) {
  .contact-lead .email-lead { font-size: var(--fs-h2); }
  .contact-more .wrap { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

/* 404 */
.lost { padding-block: 72px var(--section); }
.lost h1 { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.02em; }
.lost p { margin: 20px 0 32px; max-width: 32em; }

/* ---------- footer ---------- */

.site-footer { background: var(--panel); font-size: var(--fs-small); color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 32px; padding-block: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer a { display: inline-block; padding-block: 12px; text-decoration: none; }
@media (hover: hover) { .site-footer a:hover { color: var(--ink); text-decoration: underline; } }

/* ---------- motion: content is painted on the first frame; only transforms animate ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero h1 { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .lede { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s both; }
  .hero .cta { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s both; }
  .voyage .route-reveal { animation: chart 1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s both; }
}

@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
@keyframes chart { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
