/* Composition and color are separate axes. All public templates share these tokens. */
:root {
  --canvas: #ffffff;
  --surface: #f1f6fb;
  --card: #ffffff;
  --ink: #102b43;
  --secondary-ink: #4e6478;
  --stroke: #cedce7;
  --hero-surface: #eff5fa;
  --glass: #fffffff0;
  --brand-ink: #126b85;
  --grid-stroke: #0b587412;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme=light]) {
    --canvas: #07121f; --surface: #0c1c2d; --card: #102439;
    --ink: #edf5fc; --secondary-ink: #b0c3d4; --stroke: #2b445a;
    --hero-surface: #081b2f; --glass: #0b2136ed; --brand-ink: #72dafa;
    --grid-stroke: #74d4f314;
  }
}
:root[data-scheme=dark] {
  --canvas: #07121f; --surface: #0c1c2d; --card: #102439;
  --ink: #edf5fc; --secondary-ink: #b0c3d4; --stroke: #2b445a;
  --hero-surface: #081b2f; --glass: #0b2136ed; --brand-ink: #72dafa;
  --grid-stroke: #74d4f314;
}
body.landing[data-theme] {
  --muted: var(--secondary-ink); --line: var(--stroke); --paper: var(--surface);
  background: var(--canvas); color: var(--ink);
}
.landing[data-theme] .site-header,
.landing[data-theme] footer { background: var(--canvas); color: var(--ink); border-color: var(--stroke); }
.landing[data-theme] .site-header { border-bottom: 1px solid var(--stroke); }
.landing[data-theme] .nav-cta { border-color: var(--stroke); }
.landing[data-theme] footer>div { border-color: var(--stroke); }
.landing[data-theme] .hero { background: var(--hero-surface); color: var(--ink); }
.landing[data-theme] .hero-photo-shade {
  background: linear-gradient(90deg,var(--hero-surface) 4%,color-mix(in srgb,var(--hero-surface) 97%,transparent) 28%,color-mix(in srgb,var(--hero-surface) 76%,transparent) 52%,transparent),linear-gradient(0deg,var(--hero-surface),transparent 55%);
}
.landing[data-theme] .hero-grid { background-image: linear-gradient(var(--grid-stroke) 1px,transparent 1px),linear-gradient(90deg,var(--grid-stroke) 1px,transparent 1px); opacity: 1; }
.landing[data-theme] .hero :is(.eyebrow,.text-link),
.landing[data-theme] .eyebrow,
.landing[data-theme] .service-top .technology-icon,
.landing[data-theme] .mission-vision .technology-icon { color: var(--brand-ink); }
.landing[data-theme] :is(.hero-intro,.hero-bottom,.hero-insight div>span,.hero-photo-label) { color: var(--secondary-ink); }
.landing[data-theme] .hero-bottom { border-color: var(--stroke); }
.landing[data-theme] .hero-insight { background: var(--glass); color: var(--ink); border-color: var(--stroke); border-left-color: var(--accent); }
.landing[data-theme] .principles-strip { background: var(--surface); border-color: var(--stroke); }
.landing[data-theme] :is(.principles-strip b,.service-link span,.history-more summary span) { color: var(--brand-ink); }
.landing[data-theme] :is(.services,.contact,.method) { background: var(--canvas); }
.landing[data-theme] .about { background: var(--surface); }
.landing[data-theme] .service-grid .photo-service,
.landing[data-theme] .service-grid .photo-service:hover,
.landing[data-theme] .mission-vision article { background: var(--card); border-color: var(--stroke); }
.landing[data-theme] .section .service-grid h3 { color: var(--ink); }
.landing[data-theme] :is(.service-link,.history-more) { border-color: var(--stroke); color: var(--ink); }
.landing[data-theme] :is(.card-index,.mission-vision .eyebrow,.consent) { color: var(--secondary-ink); }
.landing[data-theme] .step-grid article { background: var(--surface); border-color: var(--stroke); border-top-color: var(--accent); }
.landing[data-theme] .values { background: var(--surface); color: var(--ink); }
.landing[data-theme] :is(.values-heading>p:last-child,.value-grid p,.value-symbol span) { color: var(--secondary-ink); }
.landing[data-theme] .value-grid article { background: var(--card); border-color: var(--stroke); }
.landing[data-theme] .value-symbol { color: var(--brand-ink); }
.landing[data-theme] .contact form { background: var(--surface); border-color: var(--stroke); }
.landing[data-theme] .contact form :is(input,textarea) { background: var(--card); color: var(--ink); border-color: var(--stroke); }
.landing[data-theme] .contact form :is(input,textarea)::placeholder { color: var(--secondary-ink); opacity: 1; }
.landing[data-theme] .purpose-banner { background: var(--hero-surface); color: var(--ink); }
.landing[data-theme] .purpose-shade { background: linear-gradient(90deg,var(--hero-surface) 12%,color-mix(in srgb,var(--hero-surface) 97%,transparent) 38%,color-mix(in srgb,var(--hero-surface) 65%,transparent) 70%,color-mix(in srgb,var(--hero-surface) 30%,transparent)); }
.landing[data-theme] .purpose-copy .eyebrow { color: var(--brand-ink); }
.landing[data-theme] .purpose-copy>p:not(.eyebrow),
.landing[data-theme] .purpose-signature { color: var(--secondary-ink); }
.landing[data-theme] .purpose-seal { color: var(--ink); background: var(--glass); padding: 18px; border-color: var(--stroke); border-radius: 4px; }
.landing[data-theme] .button { color: #081f3a; }
.landing[data-theme] :focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 5px; }
.landing[data-theme] [hidden] { display: none !important; }

/* Clarity: open composition with a framed photograph. */
body.landing[data-theme=light] .hero { min-height: 680px; }
body.landing[data-theme=light] .hero-photo { inset: 42px 5% 86px auto; width: 43%; height: calc(100% - 128px); border-radius: 24px; }
body.landing[data-theme=light] .hero-photo-shade { background: linear-gradient(90deg,var(--hero-surface) 0%,var(--hero-surface) 40%,color-mix(in srgb,var(--hero-surface) 70%,transparent) 55%,transparent 75%); }
body.landing[data-theme=light] .hero-insight { border-radius: 14px; }
body.landing[data-theme=light] .service-grid .photo-service { border-radius: 20px; }

/* Perspective keeps the original diagonal image and two-column editorial cards. */
body.landing[data-theme=editorial] .hero-photo { width: 59%; }
body.landing[data-theme=editorial] .hero-photo-shade { background: linear-gradient(90deg,var(--hero-surface) 25%,color-mix(in srgb,var(--hero-surface) 95%,transparent) 43%,transparent 85%); }

/* Infrastructure uses measured rules in either color scheme. */
body.landing[data-theme=infrastructure] .hero { background-image: linear-gradient(var(--grid-stroke) 1px,transparent 1px),linear-gradient(90deg,var(--grid-stroke) 1px,transparent 1px); background-size: 44px 44px; }
body.landing[data-theme=infrastructure] :is(.photo-service,.story-image,.mission-vision article,.value-grid article,.contact form) { border-radius: 0; }
body.landing[data-theme=infrastructure] .hero-insight { border-radius: 0; border-top: 3px solid var(--accent); }
body.landing[data-theme=infrastructure] .section-heading { border-top: 1px solid var(--stroke); padding-top: 32px; }

/* Orbit: a circular photographic window and a softer rhythm. */
body.landing[data-theme=orbit] .hero { grid-template-columns: 1.1fr 1fr; padding-top: 65px; }
body.landing[data-theme=orbit] .hero-photo { inset: 36px 5% auto auto; width: min(43vw,610px); height: auto; aspect-ratio: 1; border-radius: 50%; border: 14px solid var(--surface); object-position: 60% center; }
body.landing[data-theme=orbit] .hero-photo-shade { background: linear-gradient(90deg,var(--hero-surface) 8%,color-mix(in srgb,var(--hero-surface) 95%,transparent) 34%,transparent 65%); }
body.landing[data-theme=orbit] .hero-grid { background: none; }
body.landing[data-theme=orbit] .hero-insight { border-radius: 24px; box-shadow: 0 15px 60px #0002; }
body.landing[data-theme=orbit] .hero-art { align-items: flex-end; }
body.landing[data-theme=orbit] .button { border-radius: 40px; }
body.landing[data-theme=orbit] .photo-service { border-radius: 26px; }
body.landing[data-theme=orbit] .story-image { border-radius: 180px 180px 24px 24px; }
body.landing[data-theme=orbit] .mission-vision article,
body.landing[data-theme=orbit] .value-grid article,
body.landing[data-theme=orbit] .contact form { border-radius: 24px; }
body.landing[data-theme=orbit] .step-grid article { border-radius: 22px; padding-top: 28px; }

/* Atelier: centered opening, wide photograph and horizontal editorial stories. */
body.landing[data-theme=atelier] .hero { display: flex; flex-direction: column; align-items: center; padding-top: 60px; }
body.landing[data-theme=atelier] .hero-copy { text-align: center; max-width: 1000px; padding: 0 0 38px; }
body.landing[data-theme=atelier] .hero .eyebrow { justify-content: center; }
body.landing[data-theme=atelier] .hero h1 { font-size: clamp(54px,7vw,104px); max-width: 1000px; }
body.landing[data-theme=atelier] .hero-intro { max-width: 630px; margin-left: auto; margin-right: auto; }
body.landing[data-theme=atelier] .hero .text-link { margin: 12px 0 0 24px; display: inline-block; }
body.landing[data-theme=atelier] .hero-photo { width: 100%; height: 100%; opacity: .13; object-position: center 45%; }
body.landing[data-theme=atelier] .hero-photo-shade { background: linear-gradient(0deg,var(--hero-surface),transparent 70%); }
body.landing[data-theme=atelier] .hero-art { width: 100%; min-height: 315px; padding: 28px; align-items: flex-end; background: var(--primary) !important; border-radius: 8px !important; isolation: isolate; overflow: hidden; }
body.landing[data-theme=atelier] .hero-art::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(90deg,#081f3a33,#081f3a66),var(--hero-image,none); background-position: center 55%; background-size: cover; z-index: -1; }
body.landing[data-theme=atelier] .hero-photo-label { right: auto; left: 28px; writing-mode: horizontal-tb; color: white; }
body.landing[data-theme=atelier] .hero-bottom { width: 100%; }
body.landing[data-theme=atelier] .service-grid { grid-template-columns: 1fr; gap: 0; }
body.landing[data-theme=atelier] .service-grid .photo-service { grid-column: 1; display: grid; grid-template-columns: .8fr 1.2fr; border: 0; border-top: 1px solid var(--stroke); border-radius: 0; padding: 28px 0; box-shadow: none; background: transparent; }
body.landing[data-theme=atelier] .service-photo { height: 100%; min-height: 260px; border-radius: 4px; }
body.landing[data-theme=atelier] .service-body { padding: 18px 0 18px 8%; }
body.landing[data-theme=atelier] .service-grid .service-body h3 { font-size: 34px; }
body.landing[data-theme=atelier] .service-grid .service-body p { min-height: 0; }
body.landing[data-theme=atelier] .value-grid article { border: 0; border-top: 1px solid var(--stroke); border-radius: 0; background: transparent; padding-left: 0; }

/* Grid: compact horizontal modules and a technical, framed cover. */
body.landing[data-theme=grid] .hero { margin: 28px 3% 0; border: 1px solid var(--stroke); border-radius: 16px; min-height: 620px; padding-left: 3.2%; padding-right: 3.2%; }
body.landing[data-theme=grid] .hero-copy { max-width: 600px; }
body.landing[data-theme=grid] .hero h1 { font-size: clamp(48px,5vw,76px); }
body.landing[data-theme=grid] .hero-photo { width: 57%; }
body.landing[data-theme=grid] .hero-grid { background-size: 28px 28px; }
body.landing[data-theme=grid] .principles-strip { margin: 20px 3% 0; border: 1px solid var(--stroke); border-radius: 8px; }
body.landing[data-theme=grid] .service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
body.landing[data-theme=grid] .service-grid .photo-service { grid-column: span 1; display: grid; grid-template-columns: 30% 70%; border-radius: 6px; }
body.landing[data-theme=grid] .service-grid .photo-service:last-child { grid-column: 1/-1; grid-template-columns: 30% 70%; }
body.landing[data-theme=grid] .service-photo { height: 100%; min-height: 260px; }
body.landing[data-theme=grid] .service-body { padding: 24px; }
body.landing[data-theme=grid] .service-grid .service-body h3 { font-size: 22px; }
body.landing[data-theme=grid] .service-grid .service-body p { min-height: 0; }
body.landing[data-theme=grid] .story-layout { grid-template-columns: 1fr 1.4fr; gap: 5%; }
body.landing[data-theme=grid] .mission-vision article { border-radius: 0; border-left: 3px solid var(--accent); }
body.landing[data-theme=grid] .step-grid { gap: 0; }
body.landing[data-theme=grid] .step-grid article { border-radius: 0; }

/* Two equal previews per template; links open the real saved draft. */
.theme-option { background: white; border: 2px solid #dce5ef; border-radius: 12px; overflow: hidden; min-width: 0; }
.theme-option.selected { border-color: #007eaa; box-shadow: 0 0 0 2px #20c4f422; }
.theme-pair { display: grid; grid-template-columns: 1fr 1fr; }
.theme-sample { min-width: 0; display: block; }
.theme-sample:first-child { border-right: 1px solid #dce5ef; }
.theme-sample:focus-visible { outline: 3px solid #007eaa; outline-offset: -3px; }
.theme-sample .theme-preview { display: block; height: 175px; padding: 16px; background: #edf4fa; color: #102b43; }
.theme-sample .theme-preview[data-scheme=dark] { background: #081b2f; color: #edf5fc; }
.mini-nav { display: flex; align-items: center; justify-content: space-between; font-size: 10px; position: relative; z-index: 1; }
.theme-sample .mini-copy { position: absolute; top: 44px; left: 16px; width: 58%; }
.theme-sample .mini-copy i { background: currentColor; height: 6px; }
.theme-sample .mini-copy i:nth-child(3) { background: #20c4f4; height: 7px; width: 45%; }
.theme-sample .theme-preview img { position: absolute; right: 0; top: 35px; width: 48%; height: 102px; object-fit: cover; opacity: .65; }
.mini-cards { position: absolute; bottom: 12px; left: 16px; right: 16px; display: flex; gap: 6px; }
.mini-cards i { flex: 1; height: 17px; border: 1px solid currentColor; opacity: .25; border-radius: 2px; }
.sample-caption { display: flex; justify-content: space-between; padding: 9px 12px; background: #f5f8fb; color: #23465f; font-size: 11px; font-weight: 700; }
.theme-sample:hover .sample-caption { background: #e3f5fc; }
.theme-description { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 20px; }
.theme-description h2 { font-size: 19px; margin: 0 0 5px; letter-spacing: -.3px; }
.theme-description p { font-size: 12px; color: #526a80; margin: 0; }
.theme-description button { flex-shrink: 0; }
.theme-option.selected .theme-description button { background: #e7f5fb; border-color: #007eaa; color: #075a77; }
.theme-sample .light img { right: 10px; width: 40%; border-radius: 10px; }
.theme-sample .editorial img { clip-path: polygon(20% 0,100% 0,100% 100%,0 100%); }
.theme-sample .infrastructure { background-image: linear-gradient(#4386a320 1px,transparent 1px),linear-gradient(90deg,#4386a320 1px,transparent 1px); background-size: 18px 18px; }
.theme-sample .orbit img { width: 89px; height: 89px; right: 10px; border-radius: 50%; }
.theme-sample .orbit .mini-cards i { border-radius: 12px; }
.theme-sample .atelier .mini-copy { left: 25%; width: 60%; top: 38px; }
.theme-sample .atelier img { width: calc(100% - 32px); height: 35px; top: 104px; right: 16px; opacity: .85; }
.theme-sample .atelier .mini-cards { display: none; }
.theme-sample .grid { outline: 1px solid #5186a340; outline-offset: -8px; }
.theme-sample .grid .mini-cards { flex-wrap: wrap; }
.theme-sample .grid .mini-cards i { flex: 0 0 calc(50% - 3px); height: 10px; }

@media (max-width: 1100px) {
  .theme-description { flex-direction: column; align-items: flex-start; }
  body.landing[data-theme=grid] .service-grid { grid-template-columns: 1fr; }
  body.landing[data-theme=grid] .service-grid .photo-service { grid-column: 1; }
}
@media (max-width: 760px) {
  .landing[data-theme] .hero { min-height: 750px; }
  body.landing[data-theme] .hero-photo-shade { background: linear-gradient(180deg,var(--hero-surface) 0%,var(--hero-surface) 36%,color-mix(in srgb,var(--hero-surface) 45%,transparent) 70%,var(--hero-surface) 100%); }
  body.landing[data-theme] .hero-photo { width: 100%; height: 58%; inset: auto 0 0; border-radius: 0; clip-path: none; }
  .landing[data-theme] .hero h1 { font-size: clamp(38px,10vw,54px); }
  .landing[data-theme] .purpose-shade { background: linear-gradient(90deg,var(--hero-surface),color-mix(in srgb,var(--hero-surface) 70%,transparent)),linear-gradient(0deg,var(--hero-surface),transparent); }
  .landing[data-theme] .menu-open .site-header nav,
  .landing[data-theme].menu-open .site-header nav { background: var(--canvas); color: var(--ink); border-bottom: 1px solid var(--stroke); }
  .landing[data-theme] .site-header { position: relative; z-index: 5; }
  .landing[data-theme].menu-open .site-header nav { top: 100%; }
  body.landing[data-theme=light] .hero-photo { inset: auto 5% 70px; width: 90%; height: 300px; border-radius: 24px; }
  body.landing[data-theme=light] .hero-photo-shade { background: linear-gradient(180deg,var(--hero-surface) 33%,color-mix(in srgb,var(--hero-surface) 45%,transparent) 65%,var(--hero-surface)); }
  body.landing[data-theme=orbit] .hero { padding-top: 35px; }
  body.landing[data-theme=orbit] .hero-photo { width: 300px; height: 300px; inset: auto -30px 70px auto; border-width: 8px; }
  body.landing[data-theme=orbit] .hero-photo-shade { background: linear-gradient(180deg,var(--hero-surface) 35%,transparent 80%); }
  body.landing[data-theme=atelier] .hero { padding-top: 38px; }
  body.landing[data-theme=atelier] .hero-copy { padding-bottom: 25px; }
  body.landing[data-theme=atelier] .hero-art { min-height: 260px; height: auto; padding: 18px; }
  body.landing[data-theme=atelier] .hero-photo-label { display: none; }
  body.landing[data-theme=atelier] .hero .text-link { margin: 12px 0 0; }
  body.landing[data-theme=atelier] .service-grid .photo-service { display: block; padding: 22px 0; }
  body.landing[data-theme=atelier] .service-photo { height: 200px; min-height: 0; }
  body.landing[data-theme=atelier] .service-body { padding: 22px 0 0; }
  body.landing[data-theme=atelier] .service-grid .service-body h3 { font-size: 28px; }
  body.landing[data-theme=grid] .hero { margin: 14px 3% 0; padding: 35px 5% 0; }
  body.landing[data-theme=grid] .principles-strip { padding-left: 4%; padding-right: 4%; gap: 8px; font-size: 9px; }
  body.landing[data-theme=grid] .service-grid .photo-service { display: block; }
  body.landing[data-theme=grid] .service-photo { height: 195px; min-height: 0; }
  body.landing[data-theme=grid] .story-layout { grid-template-columns: 1fr; }
  body.landing[data-theme=grid] .step-grid { gap: 12px; }
}
@media (max-width: 420px) {
  .theme-sample .theme-preview { height: 155px; padding: 12px; }
  .sample-caption { padding: 9px 7px; font-size: 10px; }
  .theme-sample .orbit img { width: 65px; height: 65px; }
}
