/* Pre Opening Partners — shared styles.
   Identity: "Salt & Slate" palette with the critical-path mark.
   Newsreader for headlines, IBM Plex Sans for body, data and UI. */

:root {
  /* colour */
  --slate: #20333C;          /* primary ink and dark sections */
  --slate-deep: #16252C;     /* hero overlay, footer base */
  --teal: #41606B;           /* secondary ink on light ground */
  --stone: #E6E1D6;          /* rules, borders, quiet fills */
  --stone-soft: #F2EFE7;     /* alternate section ground */
  --off-white: #FBFAF7;      /* page ground */
  --accent: #6F9C93;         /* seafoam: buttons, marks, emphasis */
  --accent-deep: #5A8279;    /* hover */
  --body: #47575F;           /* body text on light */
  --muted: #7D8C93;          /* captions, labels */

  /* type */
  --display: 'Newsreader', Georgia, serif;
  --ui: 'IBM Plex Sans', system-ui, sans-serif;

  /* spacing and rhythm */
  /* The sticky header's height. scroll-margin-top below matches it, so a section
     jumped to from the nav starts flush under the header. Rounded a hair under the
     real 83.33px: too low only tucks the band behind the header, too high shows a
     strip of the section above it. Keep in step if the header changes. */
  --header-h: 83px;
  --gutter: 80px;
  --section: 112px;
  --radius: 6px;
  --max: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* The header is sticky and about 83px tall, so an anchored section would land
   beneath it with its heading cut in half. Clears it at both breakpoints. */
section[id] { scroll-margin-top: var(--header-h); }

body {
  margin: 0;
  background: var(--off-white);
  color: var(--slate);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(38px, 5.2vw, 62px); line-height: 1.08; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.16; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- layout ---------- */

.section { padding: var(--section) var(--gutter); display: flex; justify-content: center; }
.section > .inner { width: 100%; max-width: var(--max); }
.section.tight { padding-top: calc(var(--section) * 0.7); padding-bottom: calc(var(--section) * 0.7); }
/* Half the usual padding, the same 56px the contact page carries, which halves
   the space between one section's content and the next. */
.section.snug { padding-block: calc(var(--section) * 0.5); }
.on-stone { background: var(--stone-soft); }
.on-slate { background: var(--slate); color: var(--off-white); }
.on-slate h2, .on-slate h3 { color: var(--off-white); }
.on-slate p { color: #AEBEC4; }

.lede { font-size: 18px; line-height: 1.65; color: var(--body); max-width: 60ch; }
.on-slate .lede { color: #AEBEC4; }
.measure { max-width: 62ch; }

/* Centred section intro: the heading and lede sit on the page axis
   while the content below them stays left-aligned. */
.intro-centred > .inner > h1,
.intro-centred > .inner > h2,
.intro-centred > .inner > .lede { text-align: center; margin-inline: auto; }
/* Intro ledes are one or two short lines, so they take the full section width
   rather than a reading measure; that lets a long sentence hold one line. */
.intro-centred > .inner > .lede { max-width: none; }

/* ---------- brand ---------- */

.wordmark { display: inline-flex; align-items: center; gap: 7px; }
/* The mark: three bars of a plan, taking currentColor so it inverts on dark ground. */
.monogram { width: 34px; height: 34px; flex: none; display: block; color: var(--slate); }
.on-slate .monogram, footer .monogram { color: var(--off-white); }
.wordmark .name { line-height: 1.25; }
/* One line, all of it in the display face: the markup keeps the two parts so the
   name can be stacked again without touching the HTML. */
.wordmark .name .small,
.wordmark .name .big {
  font-family: var(--display); font-size: 19px; letter-spacing: 0.5px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 26px; border-radius: var(--radius);
  font-family: var(--ui); font-size: 15px; font-weight: 500; letter-spacing: 0.2px;
  border: 1.5px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #0F1D22; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-quiet { border-color: var(--slate); color: var(--slate); }
.btn-quiet:hover { background: var(--slate); color: var(--off-white); }
.btn-on-dark { border-color: rgba(251,250,247,.65); color: var(--off-white); }
.btn-on-dark:hover { background: var(--off-white); color: var(--slate); }

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

.site-header {
  position: sticky; top: 0; z-index: 20;
  padding: 16px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px;
  background: rgba(251,250,247,.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone);
}
/* The nav holds the middle track, so it sits on the page axis whatever the
   wordmark and the buttons either side of it measure. Columns 1 and 3 are
   named so the buttons stay right once the nav is hidden. */
.site-header > .wordmark { grid-column: 1; justify-self: start; }
.site-header > .header-actions { grid-column: 3; justify-self: end; }
.site-nav { grid-column: 2; justify-self: center; display: flex; align-items: center; gap: 30px; }
.site-nav a { font-size: 15px; color: var(--body); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--slate); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions .login { font-family: var(--ui); font-size: 15px; font-weight: 500; letter-spacing: 0.2px; }

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

.hero {
  position: relative; min-height: 78vh; display: flex; align-items: flex-end;
  padding: 0 var(--gutter) 72px; color: var(--off-white); overflow: hidden;
}
/* Wider than the hero, so the right of the photograph falls outside the frame and the
   island sits right of the headline. object-position trims from the top. */
.hero .backdrop { position: absolute; inset: 0; width: 124%; z-index: 0; }
.hero .backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; display: block; }
.hero .scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(22,37,44,.35) 0%, rgba(22,37,44,.55) 55%, rgba(22,37,44,.86) 100%);
}
.hero .inner { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; }
/* Puts each sentence of a two-sentence heading on its own line, while still
   letting a long sentence wrap inside that line on a narrow screen. */
.split { display: block; }
/* Space between the sentences, so a wrapped line on a phone still reads as
   two separate statements rather than one run-on paragraph. */
.split + .split { margin-top: 0.55em; }
.hero h1 { color: var(--off-white); max-width: 16ch; }
/* Keeps each sentence of the headline whole, so it breaks between them, not inside one. */
.hero h1 .clause { white-space: nowrap; }
.closing h2 .clause { display: block; }
/* The tagline is two short lines, not a paragraph, so it takes the hero width
   and each sentence holds one line on a desktop screen. */
.hero p { color: #D6DEE0; font-size: 19px; max-width: none; margin-top: 20px; }
/* Any section can carry a row of buttons; the hero and closing only vary it. */
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .cta-row { margin-top: 34px; }

/* Kept as a fallback ground behind photographs while they load, and if one is ever missing. */
.hero, .closing { background: #20333C; }
.placeholder-sea {
  background:
    radial-gradient(120% 90% at 20% 10%, #3F6C77 0%, rgba(63,108,119,0) 60%),
    radial-gradient(110% 80% at 85% 25%, #55868B 0%, rgba(85,134,139,0) 55%),
    linear-gradient(180deg, #2C4A55 0%, #20333C 55%, #16252C 100%);
}

/* ---------- pieces ---------- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: #FFFFFF; border: 1px solid var(--stone); border-radius: var(--radius);
  padding: 30px 28px; display: flex; flex-direction: column; gap: 10px;
}
.card p { font-size: 15px; color: var(--body); }
/* A third way to work with us, set well below the two plans rather than beside them:
   it is an engagement, not a subscription. */
.plans-more {
  margin-top: 76px; display: flex; flex-direction: column; align-items: center;
  gap: 24px; text-align: center;
}
.plans-more .lede { max-width: 1000px; }

/* A call to action inside a card is centred, clear of the text above it. */
.card-cta { align-self: center; margin-top: 10px; }
.card .part { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.on-slate .card { background: #263A44; border-color: #33474F; }

.numbered { display: grid; grid-template-columns: 54px 1fr; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--stone); }
.numbered:last-child { border-bottom: 0; }
.numbered .n { font-family: var(--display); font-size: 22px; color: var(--accent); }
.numbered h3 + p { margin-top: 6px; }
.on-slate .numbered { border-color: #33474F; }

/* Why us: portrait beside the text, stats centred beneath. */
.why-grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 52px; align-items: stretch; margin-top: 44px;
}
.why-text { display: flex; flex-direction: column; gap: 22px; }
/* The image is positioned out of flow so it contributes no height: the text
   sets how deep the row is, and the picture fills it. */
.portrait {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 0;
  background: #263A44; border: 1px solid #33474F;
}
.portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 100%; display: block; max-width: 100%;
}

.stat-row { display: flex; flex-wrap: wrap; gap: 48px; }
.stat-row.centred { justify-content: center; gap: 56px; margin-top: 56px; text-align: center; }
.stat-row.centred .stat { flex: 0 1 300px; }
.stat-row.centred .label { max-width: 34ch; margin-inline: auto; }
.stat .figure { font-family: var(--display); font-size: 40px; color: var(--accent); line-height: 1; }
.stat .label { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* data previews: tabular numerals, thin rules */
.data {
  width: 100%; border-collapse: collapse; font-size: 14px;
  font-variant-numeric: tabular-nums; background: #FFFFFF;
  border: 1px solid var(--stone); border-radius: var(--radius); overflow: hidden;
}
.data caption {
  caption-side: top; text-align: left; font-size: 11px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--muted); padding: 0 0 10px;
}
.data th, .data td { padding: 11px 16px; text-align: right; }
.data th:first-child, .data td:first-child { text-align: left; }
.data thead th { font-weight: 600; color: var(--muted); background: var(--stone-soft); border-bottom: 1px solid var(--stone); }
.data tbody tr + tr td { border-top: 1px solid #EFEBE2; }
.data .good { color: var(--accent-deep); }
.data .over { color: #A6503F; }

.plan { display: flex; flex-direction: column; gap: 16px; padding: 36px 32px; }
.plan .price { font-family: var(--display); font-size: 34px; line-height: 1.1; }
.plan .price small { font-family: var(--display); font-size: 15px; color: var(--muted); font-weight: 400; }
.plan ul { margin: 6px 0 0; padding-left: 18px; color: var(--body); font-size: 15px; }
.plan li { margin-bottom: 7px; }
/* A plan card can carry a second charge below the first, ruled off from it. */
.plan-part {
  border-top: 1px solid var(--stone); margin-top: 10px; padding-top: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.plan .sub-price { font-family: var(--display); font-size: 24px; line-height: 1.1; }
.plan .sub-price small { font-family: var(--display); font-size: 15px; color: var(--muted); font-weight: 400; }
.plan .fineprint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.plan .btn { align-self: center; margin-top: 8px; }
.tag { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }

.closing { position: relative; padding: 120px var(--gutter); color: var(--off-white); overflow: hidden; text-align: center; }
.closing .backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
/* This section is short, so it crops to bright sky: a heavier scrim keeps white text legible. */
.closing .scrim { background: linear-gradient(180deg, rgba(22,37,44,.72) 0%, rgba(22,37,44,.80) 100%); }
.closing .inner { position: relative; z-index: 2; max-width: 980px; margin: 0 auto; }
.closing h2 { color: var(--off-white); }
.closing p {
  color: #D6DEE0; margin-top: 18px; max-width: 960px; margin-inline: auto;
  text-wrap: pretty;
}
.closing .cta-row { justify-content: center; margin-top: 30px; }

/* ---------- app screenshots ---------- */

.shots { gap: 30px; }
.shot-card { margin: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.shot {
  aspect-ratio: 16 / 10; border: 1px solid var(--stone); border-radius: var(--radius);
  overflow: hidden; background: #FFFFFF; box-shadow: 0 1px 2px rgba(32, 51, 60, .05);
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; max-width: 100%; }
.shot-card figcaption { display: flex; flex-direction: column; gap: 8px; }
.shot-card h3 { font-size: 20px; }
.shot-card p { font-size: 15px; color: var(--body); margin: 0; }

/* ---------- forms ---------- */

form.card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 30px 28px; }
form.card .full, form.card .form-foot { grid-column: 1 / -1; }
form.card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
form.card input, form.card select, form.card textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 13px;
  border: 1px solid var(--stone); border-radius: var(--radius); background: #FFFFFF; color: var(--slate);
}
form.card textarea { min-height: 110px; resize: vertical; }
/* A box with something in it takes the tint the browser uses for what it filled in, so a
   field reads the same whether it was typed or remembered. */
form.card input:not(:placeholder-shown),
form.card textarea:not(:placeholder-shown) { background: #E8F0FE; }
form.card .form-foot {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 12px; margin-top: 10px;
}
form.card .form-foot .btn { grid-column: 2; grid-row: 1; }
form.card .form-foot .fineprint { grid-column: 3; grid-row: 1; justify-self: end; }
form.card .form-foot .form-status { grid-column: 1 / -1; grid-row: 2; text-align: center; }
/* An empty status would otherwise still take a gap above the note. */
.form-status:empty { display: none; }
.form-status { font-size: 14px; line-height: 1.5; color: var(--body); }
.form-status.ok { color: var(--accent-deep); }
.form-status.err { color: #A6503F; }
/* The asterisk marking a required field, and the note under the form explaining it. */
.req { color: var(--accent-deep); }
.form-foot .fineprint { font-size: 13px; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 900px) { form.card { grid-template-columns: 1fr; } }

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

footer.site-footer { background: var(--slate-deep); color: var(--off-white); padding: 64px var(--gutter) 36px; }
footer.site-footer .cols { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; max-width: var(--max); margin: 0 auto; }
footer.site-footer a { color: #C3CED2; font-size: 14px; }
footer.site-footer a:hover { color: var(--accent); }
footer .col-head { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: #75868D; margin-bottom: 12px; }
footer .legal {
  max-width: var(--max); margin: 40px auto 0; padding-top: 22px; border-top: 1px solid #2B3C44;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #75868D;
}

/* Five nav items need a tighter gutter and gap before the 900px breakpoint
   hides them, or they wrap and the header grows a second row. */
@media (max-width: 1180px) {
  .site-header { padding-inline: 40px; gap: 18px; }
  .site-nav { gap: 20px; }
  .site-nav a { font-size: 14px; }
  /* Keep the three stats on one row down to the mobile breakpoint. */
  .stat-row.centred { gap: 24px; }
  .stat-row.centred .stat { flex: 0 1 260px; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  :root { --gutter: 22px; --section: 72px; --header-h: 80px; }
  .site-nav { display: none; }
  /* The 1180px rule above sets 40px, which is too wide a gutter on a phone. */
  .site-header { padding-inline: var(--gutter); gap: 12px; }
  /* The name stacks, as the markup allows, so the mark and the buttons share a row. */
  .wordmark .name .small, .wordmark .name .big { display: block; white-space: nowrap; }
  .header-actions { gap: 12px; }
  .header-actions .login { font-size: 14px; white-space: nowrap; }
  .header-actions .btn { padding: 10px 16px; min-height: 40px; font-size: 14px; white-space: nowrap; }
  /* Under 16px, iOS Safari zooms the page when a field takes focus. */
  form.card input, form.card select, form.card textarea { font-size: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { min-height: 72vh; padding-bottom: 54px; }
  .why-grid { grid-template-columns: 1fr; gap: 30px; }
  .portrait { aspect-ratio: 3 / 2; }
  /* Let the qualifier sit under the figure rather than wrap awkwardly beside it. */
  .plan .price small, .plan .sub-price small { display: block; margin-top: 4px; }
  .stat-row { gap: 28px; }
  .stat-row.centred { gap: 34px; }
  .data { font-size: 13px; }
  .data th, .data td { padding: 9px 12px; }
}
