/* ==========================================================================
   Paleskies — one rule per line, grouped in the order the page renders.
   ========================================================================== */

/* Variables */
:root {
  --background-image: url("/images/1.png");
  --ink: #f5f6f2;
  --muted: rgba(245, 246, 242, .67);
  --line: rgba(255, 255, 255, .21);
  --accent: #d8f781;
  --warn: #ffb4a8;
  --surface: rgba(12, 18, 13, .32);
  --radius: 16px;
  --glass-opacity: .23;
  --glass-blur: 18px;
  --glass-saturation: 125%;
  --glass-border-opacity: .28;
  --glass-shadow: 0 18px 55px rgba(0, 0, 0, .22);
  --background-y: 12%;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --display: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}

/* Reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #091008; font-family: var(--sans); font-size: 16px; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Scrollbar hidden; the page still scrolls by wheel, trackpad, keyboard and touch. */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Cursor — a white dot in difference blend reads as the inverse of whatever sits under it.
   Pointer devices only, so touch screens keep their native behaviour. */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  .cursor { display: block; position: fixed; z-index: 999; top: 0; left: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: #fff; mix-blend-mode: difference; pointer-events: none; opacity: 0; transition: opacity .25s var(--ease); will-change: transform; }
  .cursor.is-active { opacity: 1; }
}

/* Typography */
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.035em; line-height: .91; }
h1 { font-size: clamp(4.4rem, 9.2vw, 9rem); max-width: 11ch; }
h2 { font-size: clamp(3.5rem, 7vw, 7.5rem); }
h1 em, h2 em { font-weight: 400; }
.eyebrow { color: var(--muted); font-family: var(--mono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }

/* Layout */
.scene, .veil { position: fixed; inset: 0; pointer-events: none; }
.scene { z-index: -3; background-image: var(--background-image); background-position: 65% var(--background-y); background-size: cover; background-repeat: no-repeat; transform: scale(1.02); will-change: background-position; }
.veil { z-index: -2; background: linear-gradient(90deg, rgba(3, 7, 4, .68), rgba(3, 7, 4, .17) 62%, rgba(2, 7, 5, .25)), linear-gradient(0deg, rgba(2, 8, 4, .47), transparent 48%); }
.section { width: min(1400px, calc(100% - 64px)); margin-inline: auto; }
.site-header { position: fixed; z-index: 10; top: 0; left: 0; display: flex; justify-content: center; width: 100%; padding: 26px 32px; pointer-events: none; }
.wordmark, .footer-mark { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .3em; }
.wordmark { pointer-events: auto; transition: opacity .4s var(--ease); }

/* Glass system */
.glass { background: rgba(17, 26, 19, var(--glass-opacity)); border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity)); border-radius: var(--radius); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation)); }

/* Loader */
.loader { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; background: rgba(4, 9, 5, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: opacity .7s var(--ease), visibility .7s; }
.loader-word { font-family: var(--mono); font-size: clamp(1rem, 2.2vw, 1.6rem); font-weight: 500; letter-spacing: .42em; animation: loaderBreathe 1.6s var(--ease) both; }
body.is-loaded .loader { opacity: 0; visibility: hidden; }
body.is-loaded .loader-word { transform: translateY(calc(-50svh + 32px)) scale(.45); transition: transform .8s var(--ease); }

/* Hero */
.hero { width: 100%; min-height: 100svh; display: grid; place-items: center; margin-block: 0; padding: 100px 0 46px; }
.hero-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(1560px, calc(100% - 120px), calc(177.778svh - 260px)); aspect-ratio: 16 / 9; padding: clamp(28px, 4.2vw, 72px); text-align: center; }
.hero-panel h1 { font-size: clamp(3.7rem, 7.5vw, 7rem); }
.hero-panel .eyebrow { margin-bottom: 28px; }
.hero-copy-block { display: flex; flex-direction: column; align-items: center; }
.hero-copy { max-width: 43ch; margin-top: 28px; color: rgba(255,255,255,.83); font-size: clamp(1rem, 1.45vw, 1.22rem); line-height: 1.55; }
.hero-note { position: absolute; bottom: clamp(28px, 4.2vw, 72px); left: 50%; margin: 0; color: var(--muted); font-family: var(--mono); font-size: .61rem; letter-spacing: .08em; text-transform: uppercase; transform: translateX(-50%); white-space: nowrap; }

/* Buttons */
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; font-size: .76rem; font-weight: 500; transition: transform .35s var(--ease), background .35s var(--ease), border .35s var(--ease); }
.button:hover { transform: translateY(-2px); }
.button-solid { color: #10210e; background: var(--accent); }
.button-solid:hover { background: #ebffc0; }
.button-quiet { color: var(--ink); border-color: var(--line); background: rgba(7, 13, 8, .12); }
.button-quiet:hover { background: rgba(255,255,255,.13); }
.button[disabled] { opacity: .5; pointer-events: none; }

/* Examples */
.work { padding: 126px 0; }
.section-heading { margin-bottom: 52px; }
.section-heading .eyebrow { margin-bottom: 18px; }
.reel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(11px, 1.5vw, 24px); align-items: start; }
.reel-card { position: relative; min-width: 0; }
.reel-card:nth-child(2) { padding-top: 46px; }
.reel-card:nth-child(3) { padding-top: 18px; }
.reel-card:nth-child(4) { padding-top: 67px; }
.reel-visual { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border: 1px solid rgba(255,255,255,.24); border-radius: var(--radius); box-shadow: 0 16px 45px rgba(0,0,0,.24); isolation: isolate; }
.reel-visual::before, .reel-visual::after { position: absolute; content: ""; inset: 0; }
.reel-visual::before { z-index: -2; background: var(--background-image) center / auto 125% no-repeat; transform: scale(1.08); animation: drift 14s ease-in-out infinite alternate; }
.reel-visual::after { z-index: -1; mix-blend-mode: color; opacity: .7; }

/* Placeholder wash — sits under .reel-video, so it only shows before a video paints. */
.reel-one .reel-visual::after { background: #4075bd; }
.reel-two .reel-visual::after { background: #9a644e; }
.reel-three .reel-visual::after { background: #2d6d50; }
.reel-four .reel-visual::after { background: #a7895a; }
.reel-two .reel-visual::before { animation-delay: -3s; background-position: 70% center; }
.reel-three .reel-visual::before { animation-delay: -7s; background-position: 45% center; }
.reel-four .reel-visual::before { animation-delay: -10s; background-position: 82% center; }

.reel-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; background: transparent; opacity: 0; transition: opacity .7s var(--ease); }
.reel-visual.has-video .reel-video { opacity: 1; }
.reel-mark { position: absolute; top: 15px; left: 16px; color: rgba(255,255,255,.85); font-family: var(--mono); font-size: .62rem; }
.reel-meta { padding: 14px 3px 0; }
.reel-meta h3 { font-size: .92rem; font-weight: 500; }
.reel-meta p { margin-top: 4px; color: var(--muted); font-size: .73rem; }

/* Sound toggle */
.sound-toggle { position: absolute; right: 11px; bottom: 56px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; color: white; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; background: rgba(4,8,5,.35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-family: var(--mono); font-size: .57rem; letter-spacing: .04em; transition: background .25s; }
.sound-toggle:hover, .sound-toggle[aria-pressed="true"] { background: rgba(217,248,128,.9); color: #10210e; }
.sound-bars { display: flex; align-items: center; gap: 2px; height: 10px; }
.sound-bars i { display: block; width: 1px; height: 4px; background: currentColor; }
.sound-toggle[aria-pressed="true"] .sound-bars i { animation: sound .7s ease-in-out infinite alternate; }
.sound-bars i:nth-child(2) { height: 9px; animation-delay: -.25s !important; }
.sound-bars i:nth-child(3) { height: 6px; animation-delay: -.5s !important; }

/* USP */
.principles { display: grid; grid-template-columns: 1.05fr 1.95fr; gap: clamp(50px, 9vw, 180px); align-items: start; padding: 120px 0; }
.principles .section-heading { position: sticky; top: 150px; }
.principle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.principle { min-height: 232px; padding: 24px; }
.principle span { color: var(--accent); font-family: var(--mono); font-size: .63rem; }
.principle h3 { margin-top: 72px; font-family: var(--display); font-size: 2rem; font-weight: 400; letter-spacing: -.02em; }
.principle p { margin-top: 11px; color: rgba(255,255,255,.72); font-size: .82rem; line-height: 1.55; }

/* Testimonials — markup is currently commented out in index.html; kept for when it returns. */
.testimonials { padding: 118px 0; }
.testimonials > .eyebrow { margin-bottom: 20px; }
.quote-stage { position: relative; min-height: clamp(430px, 35vw, 560px); overflow: hidden; padding: 0; }
.quote { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; gap: 28px; padding: clamp(34px, 4.8vw, 76px); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.quote.is-active { opacity: 1; transform: none; pointer-events: auto; }
.quote blockquote { grid-column: 1 / -1; align-self: center; max-width: 24ch; font-family: var(--display); font-size: clamp(2.2rem, 4vw, 4.35rem); letter-spacing: -.025em; line-height: .98; }
.quote figcaption { grid-column: 1; align-self: end; display: grid; gap: 4px; font-size: .78rem; }
.quote figcaption strong { font-weight: 500; }
.quote figcaption span { color: var(--muted); }
.quote-dots { position: absolute; z-index: 1; right: clamp(34px, 4.8vw, 76px); bottom: clamp(36px, 4.8vw, 76px); display: flex; gap: 7px; }
.quote-dots button { width: 21px; height: 2px; padding: 0; border: 0; background: rgba(255,255,255,.3); }
.quote-dots button.is-active { background: var(--accent); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(42px, 10vw, 180px); padding: 125px 0 140px; }
.contact-info > p:not(.eyebrow) { max-width: 34ch; margin-top: 27px; color: rgba(255,255,255,.79); line-height: 1.55; }
.contact-info .eyebrow { margin-bottom: 18px; }
.contact-links { display: grid; gap: 8px; margin-top: 42px; font-size: .8rem; }
.contact-links a { width: fit-content; border-bottom: 1px solid rgba(255,255,255,.45); }
.contact-links span { margin-top: 8px; color: var(--muted); font-size: .72rem; }

/* Contact form */
.contact-form { padding: clamp(22px, 3vw, 40px); }
.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field label { color: rgba(255,255,255,.78); font-size: .72rem; }
.field label span { color: var(--muted); font-size: .62rem; }
input, textarea { width: 100%; padding: 9px 0; color: var(--ink); outline: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.31); border-radius: 0; background: transparent; transition: border .25s; }
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus { border-color: var(--accent); }
input:focus-visible, textarea:focus-visible { outline: none; }
input:user-invalid, textarea:user-invalid { border-bottom-color: var(--warn); }
.submit { width: 100%; margin-top: 6px; }
/* Formspree spam trap: must stay reachable in the DOM but never visible or focusable. */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { min-height: 18px; margin-top: 15px; color: var(--accent); font-size: .72rem; line-height: 1.5; }
.form-status.is-error { color: var(--warn); }

/* Footer */
.site-footer { width: min(1400px, calc(100% - 64px)); margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; padding: 25px 0 30px; border-top: 1px solid rgba(255,255,255,.18); }
.footer-social { display: flex; gap: 17px; }
.footer-social a, .site-footer p { color: var(--muted); font-size: .66rem; }
.footer-social a:hover { color: var(--ink); }
.site-footer p { margin: 0; justify-self: end; text-align: right; line-height: 1.65; }

/* Animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes loaderBreathe { from { opacity: 0; letter-spacing: .6em; } to { opacity: 1; letter-spacing: .42em; } }
@keyframes drift { from { transform: scale(1.08) translate3d(-1%, -1%, 0); } to { transform: scale(1.16) translate3d(1%, 1%, 0); } }
@keyframes sound { to { height: 10px; } }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 820px) {
  .section, .site-footer { width: min(100% - 36px, 640px); }
  .hero { padding: 98px 0 28px; }
  .hero-panel { width: min(100% - 36px, 640px); aspect-ratio: auto; min-height: calc(100svh - 126px); }
  .reel-grid { grid-template-columns: repeat(2, 1fr); }
  .reel-card:nth-child(3) { padding-top: 0; }
  .reel-card:nth-child(4) { padding-top: 36px; }
  .principles, .contact { grid-template-columns: 1fr; gap: 10px; }
  .principles .section-heading { position: static; }
  .principle-grid { gap: 10px; }
  .contact { padding-bottom: 95px; }
  .site-footer { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-mark { grid-column: span 2; grid-row: 1; }
  .footer-social { grid-column: 1; flex-wrap: wrap; gap: 8px 14px; }
  .site-footer p { grid-column: 2; grid-row: 2; }
}

/* Phone */
@media (max-width: 520px) {
  .scene { background-size: auto 132%; background-position-x: 59%; }
  .site-header { padding: 20px 14px; }
  .hero { padding: 86px 14px 36px; }
  .section, .site-footer { width: calc(100% - 28px); }
  .hero-panel { width: 100%; min-height: 0; padding: 64px 22px 68px; }
  .hero-panel h1 { font-size: clamp(3.25rem, 14.5vw, 4.35rem); }
  .hero-panel .eyebrow { margin-bottom: 23px; }
  .hero-copy { max-width: 31ch; font-size: .95rem; }
  .button-row { width: 100%; }
  .hero-note { position: static; margin-top: 52px; transform: none; white-space: normal; }
  .work, .principles, .testimonials { padding: 86px 0; }
  .reel-grid { gap: 9px; }
  .reel-card:nth-child(2) { padding-top: 29px; }
  .reel-card:nth-child(4) { padding-top: 29px; }
  .reel-meta h3 { font-size: .78rem; }
  .reel-meta p { font-size: .62rem; }
  .sound-toggle { right: 8px; bottom: 48px; padding: 5px 6px; }
  .sound-label { display: none; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle { min-height: 180px; }
  .principle h3 { margin-top: 38px; }
  .quote-stage { min-height: 440px; }
  .quote { grid-template-columns: 1fr; padding: 30px 25px; }
  .quote blockquote { font-size: clamp(2.15rem, 10vw, 3rem); }
  .quote-dots { right: 25px; bottom: 31px; }
  .contact { padding-top: 84px; }
  .site-footer { padding-bottom: 22px; }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
