/*
 * codesculpt.ca
 *
 * Stone and ink for CodeSculpt itself, with cobalt as its one accent. Each app's page takes that app's own colour:
 * forest green for Household Finance 360, as in the app.
 * Type: Bricolage Grotesque for headings, Hanken Grotesk for text. Both are under the SIL Open Font License
 * and are served from this site, so no page calls out to another server.
 */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  color-scheme: light;
  --stone: #eceee9;
  --paper: #f8f9f6;
  --ink: #121a17;
  --muted: #55605b;
  --line: #d3d8d1;
  --cobalt: #2343c4;
  --cobalt-deep: #18309a;
  --forest: #0d3b2e;
  --forest-deep: #082a21;
  --leaf: #12805e;
  --mint: #d9efe5;
  /* The greens of the HF360 logo */
  --sage-deep: #5c7057;
  --sage: #89a482;
  --sage-light: #acc5a6;
  --accent: var(--cobalt);
  --accent-deep: var(--cobalt-deep);
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --text: 'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif;
  --wrap: 1120px;
  --r: 14px;
}
.hf360 { --accent: var(--leaf); --accent-deep: #0c6449; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--stone); color: var(--ink); font: 400 1.0625rem/1.6 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; max-width: 62ch; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0.75rem; top: 0.75rem; }
.lead { font-size: clamp(1.15rem, 1.9vw, 1.35rem); line-height: 1.5; color: var(--muted); }
.small { font-size: 0.92rem; color: var(--muted); }

/* Header */
.top { padding: 1.4rem 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.65rem; }
.brand img { height: 2.4rem; width: auto; }
.top nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3rem; padding: 0.7rem 1.35rem; border-radius: 999px; border: 2px solid var(--accent-deep); background: var(--accent-deep); color: #fff; font: 600 1rem/1.2 var(--text); text-decoration: none; cursor: pointer; transition: background 0.15s, color 0.15s; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.quiet:hover { background: var(--ink); color: #fff; }
.btn.light { background: #fff; border-color: #fff; color: var(--forest-deep); }
.btn.light:hover { background: var(--mint); border-color: var(--mint); color: var(--forest-deep); }
.btn.ghost-light { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn.ghost-light:hover { background: #fff; border-color: #fff; color: var(--forest-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* CodeSculpt home */
.statement { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.statement h1 { max-width: 15ch; }
.statement .lead { margin-top: 1.5rem; max-width: 46ch; }
.cut { display: block; height: 14px; background: var(--ink); clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%); }

.apps { background: var(--paper); border-block: 1px solid var(--line); }
.app { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.app + .app { border-top: 1px solid var(--line); }
.app-id { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.app-id img { width: 3.25rem; height: 3.25rem; border-radius: 0.8rem; object-fit: contain; }
.app-id .inq { background: #fff; border: 1px solid var(--line); padding: 0.45rem; }
.app-id span { font-family: var(--display); font-weight: 650; font-size: 1.15rem; letter-spacing: -0.01em; }
.app h2 { margin-bottom: 0.9rem; }
.app p + p { margin-top: 0.8rem; }
.app .actions { margin-top: 1.5rem; }
.shot { border-radius: var(--r); overflow: hidden; border: 1px solid rgba(18, 26, 23, 0.16); box-shadow: 0 24px 60px -28px rgba(18, 26, 23, 0.45); background: #fff; }
.plain-panel { border-radius: var(--r); background: #142c39; color: #e7f1ef; padding: clamp(1.5rem, 4vw, 2.5rem); }
.plain-panel h3 { color: #fff; margin-bottom: 0.75rem; }
.plain-panel ul { margin: 0; padding-left: 1.1rem; }
.plain-panel li + li { margin-top: 0.4rem; }

.ways { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.ways h2 { max-width: 18ch; }
.ways dl { margin: 2.25rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.ways dt { font-family: var(--display); font-weight: 650; font-size: 1.2rem; letter-spacing: -0.01em; padding-top: 1rem; border-top: 3px solid var(--ink); }
.ways dd { margin: 0.5rem 0 0; color: var(--muted); }

/* Household Finance 360 */
.hero-hf { background: var(--forest); color: #eaf3ee; padding: clamp(2.5rem, 7vw, 5rem) 0 0; overflow: hidden; }
.hero-hf h1 { color: #fff; max-width: 17ch; font-size: clamp(2.3rem, 5.4vw, 4rem); }
.hero-hf .lead { color: #c5dcd1; margin-top: 1.4rem; max-width: 48ch; }
.hero-hf .actions { margin-top: 2rem; }
.hero-hf .terms-line { margin-top: 1rem; color: #a9c8ba; font-size: 0.95rem; }
.hero-hf .shot { margin-top: clamp(2.5rem, 6vw, 4rem); border-radius: var(--r) var(--r) 0 0; border-bottom: 0; border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 -10px 70px -20px rgba(0, 0, 0, 0.6); }
.lockup { display: inline-flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.lockup img { height: 5rem; width: auto; }
.lockup .word { display: block; font-family: var(--display); font-weight: 700; font-size: 2rem; letter-spacing: 0.02em; line-height: 1; color: #fff; }
.lockup .tag { display: block; margin-top: 0.35rem; color: var(--sage-light); font-weight: 500; }
.card-logo { width: 11rem; height: auto; margin-bottom: 1.5rem; }
.app-id img.wing { width: auto; height: 3.25rem; border-radius: 0; }

.part { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.part.paper { background: var(--paper); border-block: 1px solid var(--line); }
.part > .wrap > h2 { max-width: 20ch; }
.part > .wrap > .lead { margin-top: 1rem; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.feature.flip > :first-child { order: 2; }
.feature h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 0.8rem; }
.feature p { color: var(--muted); }
.feature p + p { margin-top: 0.7rem; }

.more { margin: 2.25rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem clamp(1.5rem, 4vw, 3rem); }
.more li { padding-top: 1rem; border-top: 3px solid var(--sage-deep); }
.more strong { display: block; font-family: var(--display); font-weight: 650; font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 0.35rem; }
.more span { color: var(--muted); }

.private { background: var(--forest-deep); color: #dcebe4; }
.private h2 { color: #fff; }
.private .lead { color: #b6d1c5; }
.private .more li { border-top-color: var(--sage); }
.private .more span { color: #b6d1c5; }
.private a { color: #9fe3c6; }

.buy { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.5rem, 3.5vw, 2.25rem); }
.price { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.4rem); letter-spacing: -0.03em; line-height: 1; }
.price-note { margin-top: 0.5rem; color: var(--muted); }
.price-card ul { margin: 1.4rem 0 1.6rem; padding: 0; list-style: none; }
.price-card li { padding: 0.55rem 0 0.55rem 1.7rem; border-top: 1px solid var(--line); position: relative; }
.price-card li::before { content: ''; position: absolute; left: 0.15rem; top: 1.05rem; width: 0.7rem; height: 0.38rem; border-left: 2.5px solid var(--leaf); border-bottom: 2.5px solid var(--leaf); transform: rotate(-45deg); }
.price-card .btn { width: 100%; }
.notice { margin: 0 0 1rem; padding: 0.8rem 1rem; border-radius: 10px; background: #fdf0e6; color: #6b3410; border: 1px solid #f0c9a8; }
[hidden] { display: none !important; }

.faq { margin-top: 2rem; max-width: 760px; }
.faq details { border-top: 1px solid var(--line); padding: 1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.faq details p { margin-top: 0.7rem; color: var(--muted); }

/* Thank-you page */
.keybox { margin-top: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; }
.keybox code { display: block; font: 500 0.95rem/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; word-break: break-all; user-select: all; }
.keybox .actions { margin-top: 1rem; align-items: center; }
.steps { margin: 1.5rem 0 0; padding-left: 1.3rem; max-width: 62ch; }
.steps li + li { margin-top: 0.5rem; }

/* Text pages */
.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.doc h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
.doc .updated { margin-top: 0.8rem; color: var(--muted); }
.doc .summary { margin-top: 1.5rem; font-size: 1.15rem; padding-left: 1rem; border-left: 4px solid var(--accent); }
.doc h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.doc h3 { font-size: 1.15rem; margin-top: 1.6rem; }
.doc p { margin-top: 0.8rem; max-width: 70ch; }
.doc ul { max-width: 70ch; padding-left: 1.2rem; }

/* Footer */
footer { background: var(--ink); color: #c9d1cc; padding: 3rem 0 2rem; }
footer a { color: #e8ede9; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.foot { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
.foot .brand { color: #fff; }
.foot h2 { font-family: var(--text); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: #fff; margin-bottom: 0.7rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li + li { margin-top: 0.4rem; }
.legal-line { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #2c3833; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; font-size: 0.92rem; }

@media (max-width: 820px) {
  .app, .feature, .buy { grid-template-columns: 1fr; }
  .feature.flip > :first-child { order: 0; }
  .ways dl, .more { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .top nav { gap: 1.1rem; }
}
@media (max-width: 480px) {
  .foot { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
