/* Casmari Group — site styles
   Palette: deep lagoon, steel, limestone, mangrove, Casmari gold (from the logo; used for the thing to act on).
   Type: Archivo (expanded) for headings, Source Serif 4 for reading. */

:root {
  --lagoon: #0F3D44;
  --lagoon-deep: #0A2C31;
  --steel: #2B3136;
  --steel-soft: #5B656C;
  --limestone: #F3F4F1;
  --limestone-2: #E4E7E2;
  --mangrove: #4F6B4C;
  --signal: #CDB052;   /* Casmari gold, sampled from the logo */
  --white: #FFFFFF;

  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 66ch;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--steel);
  background: var(--limestone);
}
img { max-width: 100%; display: block; }
a { color: var(--lagoon); text-underline-offset: 3px; }
a:hover { color: var(--mangrove); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--head);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--lagoon-deep);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; font-stretch: 112%; font-weight: 700; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: 1.3rem; line-height: 1.5; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--white); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { background: var(--lagoon-deep); color: var(--white); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; }
.wordmark { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; }
.wordmark .wm-name { font-family: "Fjalla One", "Oswald", "Arial Narrow", sans-serif; font-size: 1.75rem; color: var(--signal); letter-spacing: 0.01em; }
.wordmark .wm-sub { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; color: var(--white); margin-top: 4px; }
.wordmark .wm-sub::before, .wordmark .wm-sub::after { content: ""; width: 22px; height: 1px; background: rgba(255,255,255,0.7); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a {
  font-family: var(--head); font-size: 0.95rem; font-weight: 600;
  color: var(--white); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--signal); color: var(--white); }

/* Buttons */
.button {
  display: inline-block; font-family: var(--head); font-weight: 700; font-size: 1rem;
  padding: 14px 24px; text-decoration: none; border: 2px solid var(--lagoon-deep);
  color: var(--lagoon-deep); background: transparent;
}
.button:hover { background: var(--lagoon-deep); color: var(--white); }
.button-primary { background: var(--signal); border-color: var(--signal); color: var(--lagoon-deep); }
.button-primary:hover { background: var(--lagoon-deep); border-color: var(--lagoon-deep); color: var(--signal); }

/* Hero with the service day */
.hero { background: var(--lagoon); color: var(--white); padding: clamp(48px, 8vw, 104px) 0; }
.hero h1 { color: var(--white); }
.hero p { color: #DCE7E6; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero .button { color: var(--white); border-color: var(--white); }
.hero .button:hover { background: var(--white); color: var(--lagoon-deep); }
.hero .button-primary { color: var(--lagoon-deep); border-color: var(--signal); }

.service-day { border-left: 2px solid rgba(255,255,255,0.35); padding-left: 0; margin: 0; list-style: none; }
.service-day-title { font-family: var(--head); font-weight: 700; font-size: 1rem; color: #DCE7E6; margin: 0 0 14px; }
.service-day li { position: relative; padding: 10px 0 14px 26px; }
.service-day li::before {
  content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px;
  background: var(--lagoon); border: 2px solid var(--white); border-radius: 50%;
}
.service-day time { font-family: var(--head); font-weight: 800; font-stretch: 125%; font-size: 1.35rem; display: block; color: var(--white); }
.service-day span { color: #C9D8D6; font-size: 1rem; }
.service-day li.peak::before { background: var(--signal); border-color: var(--signal); width: 16px; height: 16px; left: -9px; top: 16px; }
.service-day li.peak time { color: var(--signal); font-size: 1.7rem; }
.service-day li.peak span { color: var(--white); font-size: 1.1rem; }

/* Facts band */
.facts { background: var(--white); border-bottom: 1px solid var(--limestone-2); }
.facts dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.facts dl > div { padding: 30px 24px 30px 0; border-right: 1px solid var(--limestone-2); }
.facts dl > div:last-child { border-right: 0; }
.facts dl > div + div { padding-left: 24px; }
.facts dt { font-family: var(--head); font-stretch: 125%; font-weight: 800; font-size: 2rem; color: var(--lagoon-deep); line-height: 1.1; }
.facts dd { margin: 6px 0 0; font-size: 1rem; color: var(--steel-soft); }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--lagoon-deep); color: #DCE7E6; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark a { color: var(--signal); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.split-wide { grid-template-columns: 0.9fr 1.1fr; }

.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; margin-top: 40px; }
.columns h3 { border-top: 3px solid var(--lagoon); padding-top: 14px; }
.section-dark .columns h3 { border-top-color: rgba(255,255,255,0.4); }
.columns p { font-size: 1.02rem; }

.page-head { background: var(--lagoon); color: var(--white); padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.page-head h1 { color: var(--white); max-width: 18ch; }
.page-head p { color: #DCE7E6; }

/* Numbered sequences (only where the content is a sequence) */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 32px 0 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--limestone-2); }
.steps li::before { content: counter(step); font-family: var(--head); font-stretch: 125%; font-weight: 800; font-size: 2rem; color: var(--mangrove); line-height: 1; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; }

/* Ramp chart (headcount as a build grows) */
.ramp { display: flex; align-items: flex-end; gap: 10px; height: 220px; margin: 32px 0 8px; padding: 0; list-style: none; border-bottom: 2px solid var(--steel); }
.ramp li { flex: 1; background: var(--mangrove); position: relative; min-width: 0; }
.ramp li span { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; text-align: center; font-family: var(--head); font-weight: 700; font-size: 0.9rem; color: var(--lagoon-deep); }
.ramp-labels { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.ramp-labels li { flex: 1; font-size: 0.85rem; color: var(--steel-soft); text-align: center; line-height: 1.3; }

/* Photo placeholders: replaced with John's photos */
.photo {
  margin: 0; background: var(--limestone-2); border: 2px dashed #B8C0BB;
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;
}
.photo figcaption { font-family: var(--head); font-size: 0.95rem; color: var(--steel-soft); }
.photo-wide { aspect-ratio: 16 / 7; }

/* Quote of the operating principle */
.pull { font-family: var(--head); font-stretch: 112%; font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.3; color: var(--lagoon-deep); border-left: 6px solid var(--signal); padding: 4px 0 4px 24px; margin: 0 0 1em; max-width: 34ch; }

/* Lists */
.ticks { list-style: none; padding: 0; margin: 0 0 1em; max-width: var(--measure); }
.ticks li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--limestone-2); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 10px; height: 10px; background: var(--mangrove); }
.section-dark .ticks li { border-bottom-color: rgba(255,255,255,0.15); }

/* Fact table on case study */
.factsheet { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 1.02rem; }
.factsheet th, .factsheet td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--limestone-2); vertical-align: top; }
.factsheet th { font-family: var(--head); font-weight: 700; width: 34%; color: var(--lagoon-deep); }

/* CTA band */
.cta-band { background: var(--lagoon); color: var(--white); padding: 64px 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin: 0; max-width: 22ch; }

/* Form */
.form { display: grid; gap: 18px; max-width: 620px; }
.form label { font-family: var(--head); font-weight: 600; font-size: 0.98rem; display: block; margin-bottom: 6px; color: var(--lagoon-deep); }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 12px 14px; border: 2px solid #B8C0BB; background: var(--white); color: var(--steel); border-radius: 0;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--lagoon); outline: 3px solid var(--signal); outline-offset: 0; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .hint { font-size: 0.92rem; color: var(--steel-soft); margin: 6px 0 0; }
.form button { justify-self: start; cursor: pointer; }
.honeypot { display: none; }

/* Footer */
.site-footer { background: var(--steel); color: #C9CFD3; padding: 48px 0; font-size: 0.98rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--white); }
.site-footer p { margin: 0 0 6px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .split, .split-wide { grid-template-columns: 1fr; }
  .columns { grid-template-columns: 1fr 1fr; }
  .facts dl { grid-template-columns: 1fr 1fr; }
  .facts dl > div:nth-child(2) { border-right: 0; }
  .facts dl > div:nth-child(3) { padding-left: 0; }
  .facts dl > div { border-bottom: 1px solid var(--limestone-2); }
}
@media (max-width: 600px) {
  body { font-size: 1.06rem; }
  .columns { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .site-header .wrap { padding-top: 14px; padding-bottom: 14px; }
  .ramp { height: 160px; gap: 6px; }
  .ramp-labels { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Phase 2 additions ---------- */

/* Language switch in the header */
.site-nav .lang a { font-weight: 400; opacity: 0.85; border-bottom: 0; padding-left: 14px; border-left: 1px solid rgba(255,255,255,0.3); }
.site-nav .lang a:hover { opacity: 1; color: var(--signal); }

/* Footer link columns */
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 32px; }

/* Service blocks on Site Services */
.service-block { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 5vw, 64px); padding: 40px 0; border-top: 1px solid var(--limestone-2); }
.service-block:first-of-type { border-top: 0; }
.service-block h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.service-block .meta { font-family: var(--head); font-size: 0.95rem; color: var(--mangrove); font-weight: 600; margin-top: 8px; }
.status { background: var(--white); border-left: 6px solid var(--mangrove); padding: 18px 22px; margin: 0 0 8px; max-width: 70ch; }
.status p { margin: 0; }

/* Menu day */
.menu-day { width: 100%; border-collapse: collapse; margin: 24px 0; }
.menu-day th, .menu-day td { text-align: left; vertical-align: top; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--limestone-2); }
.menu-day th { font-family: var(--head); font-stretch: 112%; font-weight: 700; font-size: 1.2rem; color: var(--lagoon-deep); width: 22%; }
.menu-day td { font-size: 1.05rem; }
.menu-day .note { display: block; color: var(--steel-soft); font-size: 0.95rem; margin-top: 4px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.gallery .photo { aspect-ratio: 4 / 3; }
.gallery .photo.tall { grid-row: span 2; aspect-ratio: auto; }

/* Articles */
.article { max-width: 72ch; }
.article h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-top: 1.6em; }
.article ul, .article ol { padding-left: 1.2em; max-width: var(--measure); }
.article li { margin-bottom: 0.5em; }
.byline { font-family: var(--head); font-size: 0.95rem; color: #DCE7E6; margin-top: 18px; }
.article-list { list-style: none; padding: 0; margin: 24px 0 0; }
.article-list li { padding: 24px 0; border-top: 1px solid var(--limestone-2); }
.article-list h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 8px; }
.article-list a { text-decoration: none; }
.article-list a:hover h2 { text-decoration: underline; }

@media (max-width: 900px) {
  .service-block { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery .photo.tall { grid-row: auto; aspect-ratio: 4 / 3; }
  .menu-day th { width: 30%; }
}
.status + .service-block { border-top: 0; }

/* ---------- Detail pages for "What developers get" ---------- */
.columns h3 a { color: inherit; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.columns h3 a:hover { color: var(--mangrove); }
.section-dark .columns h3 a { color: var(--white); }
.more { margin-top: 4px; }
.more a { font-family: var(--head); font-weight: 600; font-size: 1rem; text-decoration-color: var(--signal); text-decoration-thickness: 2px; }
.section-dark .more a, .hero .more a { color: var(--signal); }
.crumb { margin: 0 0 14px; font-family: var(--head); font-size: 0.95rem; }
.crumb a { color: #DCE7E6; }
.related { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.related a { display: block; height: 100%; padding: 18px 16px; background: var(--limestone); border-top: 3px solid var(--lagoon); font-family: var(--head); font-weight: 700; color: var(--lagoon-deep); text-decoration: none; }
.related a:hover { border-top-color: var(--signal); background: var(--limestone-2); }
.section-dark .ticks li { color: #DCE7E6; }
@media (max-width: 900px) { .related { grid-template-columns: 1fr 1fr; } }
.steps h3 a { color: inherit; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.service-block h2 a { color: inherit; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.service-block h2 a:hover { color: var(--mangrove); }

/* Site map */
.sitemap-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 48px; align-items: start; }
.sitemap-groups h2 { font-size: 1.25rem; margin: 0 0 12px; padding-top: 12px; border-top: 2px solid var(--signal); }
.sitemap-groups ul { list-style: none; margin: 0; padding: 0; }
.sitemap-groups li { padding: 6px 0; border-bottom: 1px solid rgba(15,61,68,0.12); }
