/* Titan East Roofing website. Dark dusk look from the 3D hero, sections adapted from site-b. */
:root {
  --o: #ff5e1a;
  --o-hot: #ff7a3d;
  --ink: #0d0c0b;
  --ink-2: #15140f;
  --ink-3: #1d1b17;
  --paper: #f4efe6;
  --card: #fbfaf8;
  --muted: rgba(244, 239, 230, .72);
  --dim: rgba(244, 239, 230, .5);
  --line: rgba(244, 239, 230, .12);
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'Schibsted Grotesk', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --gutter: clamp(16px, 3.4vw, 48px);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ink); scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font: 500 12px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--o-hot);
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--o); flex: none; }
.display { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .86; letter-spacing: .005em; margin: 0; }
.display em, .h2 em { font-style: normal; color: var(--o); }
.lede { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; color: var(--muted); max-width: 30em; margin: 0; }

/* ------------------------------------------------------------ header */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px; transition: background .3s, box-shadow .3s, padding .3s; }
.top.solid { background: rgba(13, 12, 11, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line);
  padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; }
.logo { display: block; line-height: 0; }
.logo img { height: clamp(44px, 5.2vw, 70px); width: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.45)); transition: height .3s; }
.top.solid .logo img { height: clamp(38px, 4vw, 50px); }
.top-right { display: flex; align-items: center; gap: 22px; }
.top .nav { display: flex; align-items: center; gap: 24px; font: 500 14px/1 var(--body); }
.top .nav a { color: var(--muted); text-decoration: none; transition: color .15s ease-out; white-space: nowrap; }
.top .nav a:hover { color: var(--paper); }
.top .nav .nav-tel { color: var(--paper); font-weight: 600; }
.socials { display: flex; align-items: center; gap: 4px; }
.socials a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: color .15s, background-color .15s; }
.socials a:hover { color: var(--ink); background: var(--o); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1.5px solid rgba(244,239,230,.5); border-radius: 50%; background: rgba(13,12,11,.25); cursor: pointer; position: relative; padding: 0; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--paper); border-radius: 2px; transition: transform .3s var(--out); }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 24px; }
.menu-open .menu-btn span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.btn-ghost { font: 800 15px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--paper); text-decoration: none; white-space: nowrap;
  padding: 12px 18px 11px; border: 1.5px solid rgba(244,239,230,.5); border-radius: 999px; background: rgba(13,12,11,.25);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .2s, background .2s, color .2s; }
.btn-ghost:hover { border-color: var(--o); background: var(--o); color: var(--ink); }

/* ------------------------------------------------------------ hero (one screen, static, golden hour) */
/* The gradient is the first paint and the fallback without WebGL: the same golden-hour sky as the 3D scene. */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #4b6ea6 0%, #9db3cf 52%, #f2c48e 78%, #3a2a1e 100%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.vignette, .scrim-final, .grain { position: absolute; pointer-events: none; z-index: 1; }
.vignette { inset: 0; background: radial-gradient(120% 90% at 55% 45%, transparent 60%, rgba(30,18,10,.38) 100%), linear-gradient(180deg, rgba(20,14,10,.35) 0, transparent 16%); }
/* A warm, dark shade on the left keeps the headline readable over the sunlit trees. */
.scrim-final { inset: 0; background: linear-gradient(90deg, rgba(24,15,10,.86) 0%, rgba(24,15,10,.7) 32%, rgba(24,15,10,.25) 46%, rgba(24,15,10,0) 56%), linear-gradient(0deg, rgba(24,15,10,.5) 0%, transparent 26%); }
.grain { inset: -50%; z-index: 2; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.hero-copy { position: absolute; z-index: 12; left: var(--gutter); top: 52%; transform: translateY(-50%); width: min(600px, 46vw); }
.hero-copy .eyebrow { margin: 0; font-size: 11.5px; letter-spacing: .2em; color: #ffb27a; }
.hero-copy .display { font-size: clamp(68px, 8.4vw, 146px); line-height: .84; letter-spacing: 0; margin: 24px 0; text-shadow: 0 8px 40px rgba(0,0,0,.28); }
.hero-copy .display span { display: block; }
.hero-copy .lede { font-size: clamp(16.5px, 1.2vw, 18.5px); line-height: 1.6; color: rgba(250,240,228,.86); }


/* Phone only: the call to action sits at the bottom of the screen. */
.m-dock { display: none; position: absolute; z-index: 12; left: var(--gutter); right: var(--gutter); bottom: max(16px, env(safe-area-inset-bottom)); gap: 10px; }

/* First paint: a still of the scene at the visitor's time of day, then the 3D fades in over it. */
.poster { position: absolute; inset: 0; z-index: 0; background: center / cover no-repeat; }
.p-day .poster { background-image: url(/img/hero/day-desktop.jpg); }
.p-gold .poster { background-image: url(/img/hero/gold-desktop.jpg); }
.p-night .poster { background-image: url(/img/hero/night-desktop.jpg); }
@media (max-width: 760px) {
  .p-day .poster { background-image: url(/img/hero/day-mobile.jpg); }
  .p-gold .poster { background-image: url(/img/hero/gold-mobile.jpg); }
  .p-night .poster { background-image: url(/img/hero/night-mobile.jpg); }
}
#scene { opacity: 0; transition: opacity .6s ease-out; }
.scene-ready #scene { opacity: 1; }

/* A soft ring where the house was tapped (the Easter eggs). */
.tap-ring { position: fixed; z-index: 40; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255,243,220,.7); animation: tap-ring .8s var(--out) forwards; }
.tap-ring.strong { border-color: var(--o); box-shadow: 0 0 18px rgba(255,94,26,.5); }
@keyframes tap-ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #scene { transition: none; }
  .tap-ring { animation-duration: .01s; }
}

/* Poster capture (?poster): the scene only. */
.poster-mode .top, .poster-mode .hero > :not(#scene):not(.poster), .poster-mode #site { display: none !important; }

/* ------------------------------------------------------------ hero call to action */
.hero-cta { margin-top: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.hero-btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; background: var(--o); color: var(--ink); border-radius: 999px;
  padding: 18px 28px 16px; font: 900 17px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); transition: transform .25s cubic-bezier(.34,1.3,.64,1), background .2s; }
.hero-btn:hover { transform: scale(1.04); background: var(--o-hot); }
.hero-btn:focus-visible, .hero-tel:focus-visible { outline: 2px solid var(--o); outline-offset: 3px; }
.hero-tel { color: var(--muted); text-decoration: none; font-size: 16px; }
.hero-tel b { color: var(--paper); font-weight: 600; border-bottom: 1.5px solid rgba(255,94,26,.6); }
.hero-tel:hover b { color: var(--o-hot); }
.fine { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fine span { display: inline-flex; align-items: center; gap: 8px; }
.fine span::before { content: ""; width: 6px; height: 6px; background: var(--o); transform: rotate(45deg); }

/* ------------------------------------------------------------ form pieces */
.btn { flex: 1; border: 0; cursor: pointer; background: var(--o); color: var(--ink); border-radius: 12px; padding: 15px 14px 13px; font: 900 17px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  transition: transform .38s var(--spring), background .15s; }
.btn:hover { background: var(--o-hot); transform: translateY(-1px); }
.btn:active { transform: scale(.96); transition-duration: .09s; }
.btn.ghost { background: #ece7df; color: #141414; }
.btn.ghost:hover { background: #e2dcd2; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.fld { display: block; margin-top: 14px; }
.fld span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.fld i { font-style: normal; color: #6d6862; font-weight: 400; }
.fld input, .fld textarea { width: 100%; font: 16px/1.4 var(--body); padding: 13px 14px; border: 1.5px solid #ddd6cc; border-radius: 12px; background: #fff; color: #141414; outline: none; }
.fld textarea { resize: vertical; min-height: 92px; }
.fld input::placeholder, .fld textarea::placeholder { color: #a39d95; }
.fld input:focus, .fld textarea:focus { border-color: var(--o); box-shadow: 0 0 0 3px rgba(255,94,26,.15); }
.fld.bad input, .fld.bad textarea { border-color: #d9381e; }
.fld-err, #site .closer .fld-err { margin: 6px 0 0; color: #b42318; font-size: 13px; line-height: 1.35; }
.fld label { display: block; }

/* ------------------------------------------------------------ keyboard focus and skip link */
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--o); color: var(--ink); border-radius: 10px; padding: 12px 16px;
  font: 600 15px/1 var(--body); text-decoration: none; transition: top .15s ease-out; }
.skip:focus { top: max(12px, env(safe-area-inset-top)); outline: 2px solid var(--paper); outline-offset: 2px; }
main:focus { outline: none; }
.logo:focus-visible, .top .nav a:focus-visible, .socials a:focus-visible, .btn-ghost:focus-visible, .menu-btn:focus-visible, .nav-back:focus-visible,
.btn:focus-visible, #site a:focus-visible, .foot-wrap a:focus-visible { outline: 2px solid var(--o); outline-offset: 3px; }
.closer .btn:focus-visible, .closer .box a:focus-visible { outline-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.q-err { margin: 12px 0 0; color: #b42318; font-size: 14px; }
.q-done { text-align: center; padding: 18px 4px 8px; outline: none; }
.q-done h3 { font: 900 30px/1 var(--display); text-transform: uppercase; margin: 6px 0 8px; }
.q-done p { color: #6d6862; font-size: 15px; margin: 0 auto 16px; max-width: 26em; }
.q-check { width: 56px; height: 56px; margin: 6px auto 8px; border-radius: 50%; background: var(--o); color: var(--ink); display: grid; place-items: center; animation: pop .5s var(--spring); }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.q-done .btn { max-width: 240px; margin: 6px auto 0; display: block; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .top .nav { gap: 18px; }
  .top-socials { display: none; }
}
@media (max-width: 1060px) {
  .menu-btn { display: block; }
  .top .nav { display: none; position: fixed; left: 0; right: 0; top: 0; padding: calc(max(12px, env(safe-area-inset-top)) + 76px) var(--gutter) 28px;
    flex-direction: column; align-items: stretch; gap: 0; background: rgba(13,12,11,.97); box-shadow: 0 30px 60px rgba(0,0,0,.5); z-index: -1; }
  .menu-open .top .nav { display: flex; }
  .top .nav a { font-size: 19px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .top-right { gap: 12px; }
}
@media (max-width: 760px) {
  .btn-ghost { padding: 10px 14px 9px; font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; }
  .hero { min-height: 640px; }
  .hero-copy { top: calc(max(12px, env(safe-area-inset-top)) + 76px); transform: none; width: auto; right: var(--gutter); }
  .hero-copy .eyebrow { font-size: 10px; letter-spacing: .16em; }
  .hero-copy .eyebrow::before { width: 18px; }
  .hero-copy .display { font-size: clamp(58px, 17.4vw, 84px); margin: 14px 0 0; }
  .hero-copy .hero-cta, .hero-copy .fine { display: none; }
  .hero-copy .lede { margin-top: 16px; font-size: 15.5px; line-height: 1.5; max-width: 24em; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
  .m-dock { display: grid; }
  .m-dock .hero-btn { justify-content: center; padding: 18px 20px 16px; }
  .m-dock .hero-tel { text-align: center; font-size: 15px; padding: 4px 0; }
  .scrim-final { background: linear-gradient(180deg, rgba(24,15,10,.72) 0%, rgba(24,15,10,.2) 34%, transparent 46%, rgba(24,15,10,.86) 74%); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
