/* Float Plan Messenger — site styles (palette shared with boatmanager.app) */

:root {
  --ink: #16324f;
  --ink-soft: #4a5f70;
  --accent: #006be0;
  --accent-soft: #dceafc;
  --bg: #fbfbfa;
  --bg-alt: #f0f3ee;
  --line: #d8dfd9;
  --white: #ffffff;
  --display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7ecef;
    --ink-soft: #a9b7bf;
    --accent: #0a84ff;
    --accent-soft: #16253a;
    --bg: #10171b;
    --bg-alt: #18211f;
    --line: #2b3a37;
    --white: #16201f;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- header ---- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  max-width: 860px;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}
.brand .mark {
  width: 30px;
  height: 30px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url(logo.png) center / contain no-repeat;
  mask: url(logo.png) center / contain no-repeat;
}
/* No mask support: fall back to the flat PNG, which stays dark in either theme. */
@supports not ((-webkit-mask-image: url(logo.png)) or (mask-image: url(logo.png))) {
  .brand .mark {
    background: url(app-icon.png) center / contain no-repeat;
  }
}
.brand img { width: 30px; height: 30px; }
nav.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  flex-wrap: wrap;
}
nav.site-nav a { color: var(--ink-soft); }
nav.site-nav a.current { color: var(--accent); font-weight: 600; }

/* ---- hero ---- */
.hero {
  padding: 64px 0 48px;
  text-align: center;
}
.hero .wrap { max-width: 700px; }
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
h1 {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  margin: 0 0 18px;
  text-wrap: balance;
}
.sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 auto;
}
.cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.cta-row-left {
  justify-content: flex-start;
  margin-top: 22px;
}
.app-store-badge {
  display: inline-flex;
  line-height: 0;
}
.app-store-badge:hover { opacity: 0.82; }
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}
.btn-primary {
  background: var(--ink);
  color: var(--white) !important;
  text-decoration: none !important;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: var(--bg-alt);
  color: var(--ink) !important;
  text-decoration: none !important;
  border: 1px solid var(--line);
}

/* ---- content sections ---- */
main { padding: 8px 0 72px; }
section { padding: 40px 0; }
section + section { border-top: 1px solid var(--line); }
h2 {
  font-family: var(--display);
  font-size: 26px;
  margin: 0 0 14px;
}
h3 {
  font-family: var(--display);
  font-size: 19px;
  margin: 0 0 8px;
}
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

.lede {
  font-size: 18px;
  color: var(--ink-soft);
}

.callout {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  margin: 28px 0;
}
.callout h3 { margin-top: 0; color: var(--accent); }

/* feature blocks */
.feature {
  padding: 22px 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature h3 { margin-bottom: 6px; }

/* faq */
.faq dt {
  font-weight: 700;
  margin-top: 18px;
}
.faq dd {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

/* contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
}
.contact-form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 12px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.contact-form button {
  margin-top: 20px;
  align-self: flex-start;
  border: none;
  cursor: pointer;
  font: inherit;
}
.form-alt {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* legal pages */
.legal h2 { font-size: 20px; margin-top: 34px; }
.legal p, .legal li { font-size: 15px; color: var(--ink-soft); }
.legal .meta { font-size: 14px; color: var(--ink-soft); margin-bottom: 30px; }

/* footer */
footer.site {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
footer.site .wrap {
  max-width: 860px;
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-soft);
}
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.site nav a { color: var(--ink-soft); }

@media (max-width: 560px) {
  header.site .wrap { justify-content: center; text-align: center; }
  nav.site-nav { justify-content: center; }
  footer.site .wrap { flex-direction: column; text-align: center; }
}

/* A device shot beside a feature block: text left, image right on wide
   screens, image below the text on phones. */
.feature.has-shot {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 8px 32px;
  align-items: start;
}
.feature.has-shot > * { grid-column: 1; }
.feature.has-shot .shot { grid-column: 2; grid-row: 1 / span 4; margin: 0; min-width: 0; }
.feature.has-shot .shot img { display: block; width: 100%; max-width: 100%; height: auto; }
.feature.has-shot .shot figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 6px;
}
/* A wide (Mac) shot sits under the text at full column width. */
.feature.has-wide-shot .shot { margin: 18px auto 6px; max-width: 640px; }
.feature.has-wide-shot .shot img { display: block; width: 100%; max-width: 100%; height: auto; }
.feature.has-wide-shot .shot figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 6px;
}
@media (max-width: 640px) {
  .feature.has-shot { grid-template-columns: 1fr; }
  .feature.has-shot .shot { grid-column: 1; grid-row: auto; order: 10; max-width: 240px; margin: 8px auto 0; }
}

.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;
}
.legal ul.defs { padding-left: 18px; }
.legal ul.defs li { font-size: 15px; color: var(--ink-soft); }
.legal ul.defs em { font-style: normal; font-weight: 700; color: var(--ink); }
.shot-inline { margin: 14px 0 22px; max-width: 360px; }
.shot-inline img { border: 1px solid var(--line); border-radius: 10px; width: 100%; height: auto; }
.shot-inline.wide { max-width: 560px; }
.shot-inline figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.maker {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 8px 0;
}
.maker h2 { font-size: 22px; margin-bottom: 8px; }
.maker p:last-child { margin-bottom: 0; }

/* ---- trip page (/t/) ---- */
:root {
  --ok: #1e7b3a;  --ok-soft: #e3f3e7;
  --warn: #9a5800; --warn-soft: #fdf1dc;
  --alarm: #b3261e; --alarm-soft: #fbe5e3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ok: #4cc06e;  --ok-soft: #12261a;
    --warn: #f0a640; --warn-soft: #2c2211;
    --alarm: #ff6b5e; --alarm-soft: #331513;
  }
}
.trip-main { padding: 8px 0 56px; }
.trip-main .wrap { max-width: 680px; }
.trip-status {
  border-radius: 14px;
  padding: 20px 22px;
  margin: 20px 0 6px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
}
.trip-status h1 { font-size: clamp(28px, 7vw, 38px); margin: 0 0 8px; }
.trip-status p { margin: 0 0 6px; font-size: 17px; }
.trip-status .sent { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.trip-status .tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  background: var(--warn);
  color: var(--white);
}
.trip-status--due { background: var(--warn-soft); border-color: var(--warn); }
.trip-status--overdue { background: var(--alarm-soft); border-color: var(--alarm); }
.trip-status--overdue h1 { color: var(--alarm); }
.trip-status--back { background: var(--ok-soft); border-color: var(--ok); }
.trip-status--back h1 { color: var(--ok); }
.trip-status--error { background: var(--bg-alt); border-color: var(--line); }
.trip-page section { padding: 26px 0; }
.trip-card h2 { margin-bottom: 4px; }
.trip-card .who { color: var(--ink-soft); margin-bottom: 12px; }
.timeline { list-style: none; padding: 0; margin: 0 0 12px; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
.timeline li:last-child { border-bottom: none; }
.timeline .when { display: inline-block; min-width: 92px; font-weight: 700; }
.map-link { font-size: 14px; white-space: nowrap; }
.trip-card .note { white-space: pre-wrap; background: var(--bg-alt); border-radius: 10px; padding: 12px 14px; }
.trip-guide.now { background: var(--alarm-soft); border-radius: 14px; padding: 22px; border-top: none; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.call-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white) !important;
  font-weight: 700;
  text-decoration: none !important;
}
.call-btn.urgent { background: var(--alarm); color: #fff !important; }
.trip-page button.btn { border: 1px solid var(--line); cursor: pointer; font: inherit; font-weight: 600; min-height: 44px; }
.fine { font-size: 14px; color: var(--ink-soft); }
.trip-details h3 { margin: 20px 0 6px; font-size: 16px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-family: var(--body); }
.details { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 6px 14px; margin: 0; }
.details dt { font-weight: 700; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.trip-foot p { font-size: 14px; color: var(--ink-soft); }
@media (max-width: 480px) {
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: 10px; }
  .timeline .when { display: block; }
}
