/* GraySky Renovations — "Storm" design, dark default with a light mode.
   All theming rides these tokens; never hardcode a surface/ink color below. */

:root {
  --bg: #101215;
  --bg-2: #16191d;
  --bg-card: #1a1e23;
  --bg-deep: #000000;
  --ink: #f2f2f0;
  --ink-2: #b9bec3;
  --ink-3: #a4a9ae;
  --muted: #8a9096;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.08);
  --accent: #6a8aa6;          /* button fill */
  --on-accent: #0e1114;       /* text on button fill */
  --accent-text: #8aa2b5;     /* colored text on background */
  --hero-grad: radial-gradient(ellipse 1200px 480px at 50% -80px, #3a4048 0%, #23272d 45%, #14171b 100%);
  --cta-grad: radial-gradient(ellipse 1000px 400px at 50% 120%, #2e343b 0%, #16191d 70%);
  --shadow-hero: 0 2px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg: #f5f4f2;
  --bg-2: #ffffff;
  --bg-card: #ffffff;
  --bg-deep: #ffffff;
  --ink: #16181b;
  --ink-2: #40454a;
  --ink-3: #5c6167;
  --muted: #6d7378;
  --line: #e3e1dd;
  --line-2: #eae8e4;
  --accent: #54718a;
  --on-accent: #ffffff;
  --accent-text: #4d6a85;
  --hero-grad: radial-gradient(ellipse 1200px 480px at 50% -80px, #dfe1e3 0%, #ecedee 45%, #f5f4f2 100%);
  --cta-grad: radial-gradient(ellipse 1000px 400px at 50% 120%, #e6e7e8 0%, #f5f4f2 70%);
  --shadow-hero: none;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.disp {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.kicker { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; font-weight: 600; font-size: 16px; letter-spacing: 0.24em; color: var(--accent-text); }
.section-title { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: 0.02em; text-wrap: balance; }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 700; font-size: 17px; letter-spacing: 0.1em;
  padding: 15px 28px; min-height: 44px; cursor: pointer; text-decoration: none;
  border: 1.5px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* ---- Header ---- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line-2);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; max-width: 1240px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .mark { display: block; height: 44px; width: auto; }
[data-theme="light"] .mark-light { display: none; }
:root:not([data-theme="light"]) .mark-dark { display: none; }
.wordmark {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 700; font-size: 20px; letter-spacing: 0.18em; color: var(--ink);
  text-transform: uppercase; line-height: 1.1; white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 600; font-size: 16px; letter-spacing: 0.12em; color: var(--ink-2);
  padding: 10px 2px; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); cursor: pointer; flex: none;
}
.icon-btn:hover { border-color: var(--ink); }
#theme-toggle .sun { display: none; }
#theme-toggle .moon { display: block; }
[data-theme="light"] #theme-toggle .sun { display: block; }
[data-theme="light"] #theme-toggle .moon { display: none; }
#menu-toggle { display: none; }
/* A2: header CTA matches the 44px icon buttons (hero CTAs keep the full size) */
.header-cta { padding: 0 20px; height: 44px; line-height: 1; font-size: 15px; white-space: nowrap; }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-grad);
  text-align: center;
  padding: 108px 24px 96px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; inset: -20% -30%; pointer-events: none;
  background:
    radial-gradient(ellipse 480px 160px at 18% 22%, rgba(255,255,255,0.05), transparent 70%),
    radial-gradient(ellipse 620px 200px at 78% 12%, rgba(255,255,255,0.04), transparent 70%);
}
.hero::after {
  background:
    radial-gradient(ellipse 520px 170px at 65% 30%, rgba(255,255,255,0.035), transparent 70%),
    radial-gradient(ellipse 420px 150px at 30% 8%, rgba(255,255,255,0.03), transparent 70%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: drift-a 80s linear infinite alternate; }
  .hero::after { animation: drift-b 110s linear infinite alternate; }
  @keyframes drift-a { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
  @keyframes drift-b { from { transform: translateX(2.5%); } to { transform: translateX(-2.5%); } }
  .hero-in > * { animation: rise 0.7s ease-out both; }
  .hero-in > *:nth-child(2) { animation-delay: 0.08s; }
  .hero-in > *:nth-child(3) { animation-delay: 0.16s; }
  .hero-in > *:nth-child(4) { animation-delay: 0.24s; }
  .hero-in > *:nth-child(5) { animation-delay: 0.32s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
.hero-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 1040px; margin: 0 auto; }
.hero .kicker { letter-spacing: 0.26em; text-wrap: balance; }
.hero h1 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 700; font-size: clamp(44px, 7.5vw, 88px); line-height: 0.98;
  letter-spacing: 0.01em; text-shadow: var(--shadow-hero); text-wrap: balance;
}
.hero .sub { font-size: 19px; color: var(--ink-2); max-width: 560px; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 6px; }
.hero-cred { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.06em; }
.hero-cred svg { flex: none; }
.hero-cred span { white-space: nowrap; }

/* ---- Services ---- */
.services { padding: 84px 0; }
.section-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 44px; }
.svc-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.svc {
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  flex: 1 1 0; min-width: 190px;
  padding: 30px 18px; border: 1px solid var(--line); background: var(--bg-2);
}
.svc svg { color: var(--ink-3); }
.svc h3 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 700; font-size: 19px; letter-spacing: 0.08em;
}
.svc p { font-size: 14.5px; line-height: 1.45; color: var(--ink-3); text-wrap: balance; }

/* ---- Work: before / after pairs ---- */
.work { padding: 0 0 84px; }
.ba-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ba { margin: 0; border: 1px solid var(--line); background: var(--bg-2); }
.ba-lead { grid-column: 1 / -1; }
.ba-panes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--line); }
.ba-pane { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-deep); }
.ba-pane img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ba-pane-wide { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.ba-tag {
  position: absolute; left: 10px; top: 10px;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 600; font-size: 12px; letter-spacing: 0.16em; line-height: 1;
  padding: 6px 9px 5px; background: rgba(16, 18, 21, 0.82); color: #fff;
}
.ba-tag-after { background: var(--accent); color: var(--on-accent); }
.ba figcaption { padding: 14px 16px 15px; }
.ba figcaption h3 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 700; font-size: 19px; letter-spacing: 0.08em;
}

/* ---- Work: home "see all" link ---- */
.work-more { display: flex; justify-content: center; margin-top: 32px; }

/* ---- Work page ---- */
.page-head { padding: 72px 0 44px; text-align: center; border-bottom: 1px solid var(--line-2); }
.page-head .wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.page-head .sub { font-size: 18px; color: var(--ink-2); max-width: 560px; text-wrap: pretty; }
.projects { padding: 56px 0 84px; }
.projects .wrap { display: flex; flex-direction: column; gap: 36px; }
.project { scroll-margin-top: 84px; }
.project-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px 56px; padding: 26px 28px 30px; }
.project-tag { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; font-weight: 600; font-size: 14px; letter-spacing: 0.2em; color: var(--accent-text); margin-bottom: 8px; }
.project-copy h2 { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; font-weight: 700; font-size: clamp(26px, 3vw, 32px); letter-spacing: 0.04em; line-height: 1.05; margin-bottom: 12px; }
.project-copy p:last-child { color: var(--ink-2); line-height: 1.6; max-width: 58ch; text-wrap: pretty; }
.project-done h3 { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; font-weight: 700; font-size: 15px; letter-spacing: 0.16em; color: var(--ink-2); margin-bottom: 10px; }
.project-done ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.project-done li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.45; color: var(--ink-3); }
.project-done li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 2px; background: var(--accent-text); }
.collage { padding: 0 0 84px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; gap: 18px; }
.tile { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line); background: var(--bg-deep); }
/* wide tiles take the row height of the square beside them; the image is out of flow so it can't stretch the row */
.tile-wide { grid-column: span 2; aspect-ratio: auto; }
.tile img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.page-cta { background: var(--cta-grad); border-top: 1px solid var(--line-2); padding: 72px 0; text-align: center; }
.page-cta .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.page-cta .hero-ctas { margin-top: 10px; }

/* ---- About ---- */
.about { background: var(--bg-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 84px 0; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
.about-copy { display: flex; flex-direction: column; gap: 16px; }
.about-copy .kicker, .contact-copy .kicker { margin-bottom: -4px; }
.about .lede { color: var(--ink-2); line-height: 1.65; max-width: 62ch; text-wrap: pretty; }
.about-art { border: 1px solid var(--line); display: block; width: 100%; height: auto; }

/* ---- Process ---- */
.process { padding: 84px 0; }
.process .section-title { text-align: center; margin-bottom: 44px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent-text);
  color: var(--accent-text); display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 700; font-size: 19px;
}
.step h3 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 700; font-size: 18px; letter-spacing: 0.08em;
}
.step p { font-size: 14px; line-height: 1.45; color: var(--ink-3); max-width: 250px; text-wrap: pretty; }

/* ---- Contact / CTA ---- */
.contact { background: var(--cta-grad); border-top: 1px solid var(--line-2); padding: 84px 0; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 16px; }
.contact-copy .sub { color: var(--ink-2); max-width: 480px; text-wrap: pretty; }
.contact-lines { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.contact-line { display: flex; align-items: center; gap: 12px; font-size: 17px; color: var(--ink); }
.contact-line svg { color: var(--accent-text); flex: none; }
.contact-line a { color: var(--ink); font-weight: 600; }
.estimate {
  background: var(--bg-2); border: 1px solid var(--line); padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.estimate h3 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 700; font-size: 22px; letter-spacing: 0.06em;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-2); text-transform: uppercase; font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; }
.field input, .field textarea {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  padding: 12px 14px; font: inherit; font-size: 16px; min-height: 44px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 0; border-color: transparent; }
.estimate .note { font-size: 13px; color: var(--muted); text-wrap: pretty; }
/* Bot trap: off-screen, never visible or focusable for people */
.estimate .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.estimate { position: relative; }
.form-status { font-size: 15px; color: var(--ink); text-wrap: pretty; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--ink); border-left: 3px solid var(--accent-text); padding-left: 10px; }
.form-status.is-ok { border-left: 3px solid var(--ink-2); padding-left: 10px; }
.estimate button[disabled] { opacity: .6; cursor: progress; }

/* ---- Footer ---- */
footer { background: var(--bg-deep); }
.footer-in { padding: 48px 24px 40px; max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.footer-brand .mark { height: 64px; width: auto; align-self: flex-start; }
/* the logo's own serif wordmark, lifted from Richard's logo file (docs/reference) */
.footer-brand .footer-wordmark { width: 240px; height: auto; align-self: flex-start; }
.footer-cols { display: flex; gap: 32px 72px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col .footer-h {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase;
  font-weight: 700; font-size: 15px; line-height: 1.55; letter-spacing: 0.16em; color: var(--ink-2);
}
.footer-col span, .footer-col a { font-size: 15px; color: var(--ink-3); }
.footer-bar { border-top: 1px solid var(--line); padding: 16px 24px; max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bar span, .footer-bar a { font-size: 13px; color: var(--muted); }
.footer-bar span { text-wrap: balance; }

/* ---- Legal pages ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.legal h1 { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; font-size: 40px; margin-bottom: 16px; }
.legal h2 { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; font-size: 22px; margin: 28px 0 8px; }
.legal p { margin-bottom: 12px; color: var(--ink-2); max-width: 57ch; }
.legal .legal-back { margin-top: 32px; }
.legal-header .header-in { justify-content: flex-start; }

/* ---- Simple holding/404 ---- */
.holding { min-height: 60svh; display: grid; place-items: center; text-align: center; padding: 48px 24px; }
.holding h1 { font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; text-transform: uppercase; font-size: clamp(28px, 5vw, 44px); }

/* ---- Responsive ---- */
/* Nav collapses at 1140: below that the five links + CTA can't share one row
   with the wordmark (the header broke apart at 901-1139). */
@media (max-width: 1140px) {
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-deep); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line-2); }
  .nav-open .nav { display: flex; }
  #menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
}
/* A4: never leave an orphan card/frame/step ragged-left */
@media (max-width: 1080px) {
  .svc { flex: 0 1 calc((100% - 36px) / 3); }
}
@media (min-width: 561px) and (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 660px) {
  /* the 3-across rule drops under .svc's 190px min until 654px */
  .svc { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .project-body { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 20px 18px 24px; }
}
@media (max-width: 640px) {
  .ba-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head { padding: 56px 0 36px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile-wide, .tile:last-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
  .collage { padding-bottom: 64px; }
  .projects { padding: 40px 0 64px; }
  .projects .wrap { gap: 24px; }
  .ba-tag { left: 8px; top: 8px; font-size: 11px; }
  .ba figcaption { padding: 12px 14px; }
  .ba figcaption h3 { font-size: 17px; }
}
@media (max-width: 560px) {
  .hero-cred { flex-direction: column; gap: 6px; }
  .hero-cred .dot { display: none; }
  /* phones: the wordmark stacks to two lines beside the mark (the 08-24 Storm look) */
  .wordmark { font-size: 16px; letter-spacing: 0.12em; white-space: normal; }
  .brand .mark { height: 36px; }
  .hero { padding: 72px 20px 64px; }
  .hero-ctas .btn { width: 100%; }
  .hero-ctas { flex-direction: column; align-self: stretch; }
  .page-cta .hero-ctas { width: 100%; }
  .estimate { padding: 22px; }
}
@media (max-width: 374px) {
  .wordmark { font-size: 14px; letter-spacing: 0.08em; }
}
