/* =========================================================
   ENVER.TR — Design System
   ========================================================= */

@property --r{
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}
@property --spin{
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}
@property --item-scale{
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}
@property --ring-w{
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}
@property --ring-h{
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

:root{
  /* ---- palette ---- */
  --background: #0a0a0b;
  --background-2: #0c0c0e;
  --surface: #131316;
  --surface-light: #1b1b1f;
  --surface-glass: rgba(19,19,22,0.78);

  --text: #ececea;
  --text-muted: #8d8d93;
  --text-faint: #55555c;

  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.18);

  --accent: #c9a24d;
  --accent-bright: #ddb865;
  --accent-soft: rgba(201,162,77,0.12);
  --accent-line: rgba(201,162,77,0.45);

  /* ---- system ---- */
  --radius: 20px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --transition: 520ms cubic-bezier(.16,.8,.24,1);
  --transition-fast: 240ms cubic-bezier(.16,.8,.24,1);
  --transition-slow: 900ms cubic-bezier(.16,.8,.24,1);

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --orbit-radius: clamp(150px, 24vw, 300px);
  --hub-size: clamp(120px, 14vw, 172px);

  --edge: clamp(20px, 4vw, 56px);

  /* ---- Phase 7: atmosphere (public site only) ----
     Defaults below are IDENTICAL to the colors the canvas system already
     hardcoded before this phase (accent-bright / accent as decimal RGB),
     so with no [data-atmosphere] attribute on <html> (or "night", which
     has no override block) the page renders byte-for-byte the same as
     before this phase. script.js reads these once via getComputedStyle
     when the atmosphere changes — never per animation frame. */
  --atmo-glow-top: #141417;
  --atmo-star-rgb: 221,184,101;
  --atmo-orbit-rgb: 201,162,77;
  --atmo-streak-rgb: 221,184,101;
  --atmo-star-opacity-mul: 1;
  --atmo-moon-opacity: 0.85;
  --atmo-moon-glow: 0.18;
  --atmo-transition: 3000ms;
}

/* ---- Automatic mode resolves to one of these at runtime (script.js) ----
   "night" intentionally has no override block: it IS the :root default
   above, so a fresh page load before JS runs (or with JS disabled) is
   never wrong — night is both the safe fallback and a real mode. */
[data-atmosphere="day"]{
  --atmo-glow-top: #1c1912;
  --atmo-star-rgb: 214, 196, 150;
  --atmo-orbit-rgb: 201, 172, 108;
  --atmo-streak-rgb: 214, 196, 150;
  --atmo-star-opacity-mul: 0.32;
  --atmo-moon-opacity: 0.18;
  --atmo-moon-glow: 0.08;
}
[data-atmosphere="sunset"]{
  --atmo-glow-top: #201510;
  --atmo-star-rgb: 232, 170, 120;
  --atmo-orbit-rgb: 214, 140, 84;
  --atmo-streak-rgb: 232, 150, 96;
  --atmo-star-opacity-mul: 0.62;
  --atmo-moon-opacity: 0.55;
  --atmo-moon-glow: 0.14;
}
[data-atmosphere="dawn"]{
  --atmo-glow-top: #171526;
  --atmo-star-rgb: 190, 178, 224;
  --atmo-orbit-rgb: 150, 138, 202;
  --atmo-streak-rgb: 200, 188, 232;
  --atmo-star-opacity-mul: 0.48;
  --atmo-moon-opacity: 0.6;
  --atmo-moon-glow: 0.16;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,p,ul,figure{ margin: 0; }
ul{ list-style: none; padding: 0; }
button{
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

::selection{ background: var(--accent-soft); color: var(--accent-bright); }

:focus-visible{
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* =========================================================
   Custom cursor
   ========================================================= */
.cursor-dot, .cursor-ring{
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 999;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot{
  width: 4px; height: 4px;
  background: var(--accent);
  transition: transform 120ms ease, opacity 200ms ease;
}
.cursor-ring{
  width: 30px; height: 30px;
  border: 1px solid var(--border-strong);
  transition: width 260ms cubic-bezier(.16,.8,.24,1), height 260ms cubic-bezier(.16,.8,.24,1),
              border-color 260ms ease, opacity 200ms ease;
}
.cursor-ring.is-active{
  width: 54px; height: 54px;
  border-color: var(--accent-line);
}
@media (pointer: coarse){
  .cursor-dot, .cursor-ring{ display: none; }
}
@media (hover: none){
  .hub:hover, .hub:focus-visible{
    transform: none;
    box-shadow: 0 0 0 0 rgba(201,162,77,0);
  }
  .hub:hover .hub__ring, .hub:focus-visible .hub__ring{
    border-color: transparent;
    transform: none;
  }
  .window__close:hover{ transform: none; }
  .article-back:hover{ gap: 8px; }
  .form-submit:hover{ background: none; }
  .contact-method:hover{ transform: none; }
  .contact-method:hover .contact-method__icon{ color: var(--text-faint); }
  .contact-method:hover .contact-method__value{ color: var(--text); }
  .form-file__button:hover{ border-color: var(--border-strong); color: var(--text-muted); }
  .form-file__list-item__remove:hover{ color: var(--text-faint); }
  /* Project cards (Phase 2 hover polish): a tap on a touch device can
     leave :hover "stuck" until the user taps elsewhere, which would
     otherwise leave a card visibly lifted/glowing/mis-colored after
     navigation. Reset to the resting state, same pattern as .hub above. */
  .project-card:hover .project-card__media{
    border-color: var(--border);
    transform: none;
    box-shadow: none;
  }
  .project-card:hover .project-card__title{ color: inherit; }
  .project-card:hover .project-card__link{ gap: 5px; }
  .project-card:hover .project-card__link::after{ transform: none; }
  /* Blog cards (Phase 4 hover polish): same stuck-hover reset as the
     project cards above. */
  .blog-featured:hover .blog-media,
  .blog-card:hover .blog-media{
    border-color: var(--border);
    transform: none;
    box-shadow: none;
  }
  .blog-card:hover .blog-card__title{ color: inherit; }
  .blog-featured:hover .blog-featured__title{ color: inherit; }
  .related-card:hover .blog-media{
    border-color: var(--border);
    transform: none;
    box-shadow: none;
  }
  .related-card:hover .related-card__title{ color: inherit; }
}

/* =========================================================
   Atmosphere / background layers
   ========================================================= */
.atmosphere{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 8%, var(--atmo-glow-top) 0%, var(--background) 46%),
    var(--background);
  /* Slow, elegant cross-fade when the atmosphere changes (Phase 7) —
     deliberately slower than --transition-slow (900ms), which is used for
     ordinary UI chrome, not this ambient background. */
  transition: background var(--atmo-transition) ease;
}
#bg-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  transition: opacity 700ms ease, filter 700ms ease;
}
/* ---- Phase 7: moon (optional, subtle; CSS-only two-circle phase) ----
   Positioned and sized modestly so it reads as a quiet ambient detail,
   never competing with the orbit-nav hub. Hidden entirely via
   html[data-moon="off"] below (Admin → Settings → Appearance → Moon, or
   Automatic-mode day where opacity is already near-zero). */
.moon{
  position: absolute;
  top: 9%;
  right: 12%;
  width: clamp(26px, 3.2vw, 44px);
  height: clamp(26px, 3.2vw, 44px);
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #f5f0e2 0%, #d9d3bd 55%, #b6af98 100%);
  box-shadow:
    0 0 24px 6px rgba(245,240,226, var(--atmo-moon-glow)),
    0 0 64px 20px rgba(245,240,226, calc(var(--atmo-moon-glow) * 0.4));
  opacity: var(--atmo-moon-opacity);
  transition: opacity var(--atmo-transition) ease, box-shadow var(--atmo-transition) ease;
  pointer-events: none;
}
/* The shadow circle's left offset is set once per page load by script.js
   (computeMoonPhase()) as --moon-shadow-x, a simple deterministic
   days-since-reference-new-moon calculation — see that function's own
   comment for why this is intentionally NOT real astronomical precision. */
.moon__shadow{
  position: absolute;
  top: -6%;
  left: var(--moon-shadow-x, 100%);
  width: 112%;
  height: 112%;
  border-radius: 50%;
  background: var(--background);
}
html[data-moon="off"] .moon{ display: none; }
body.window-open #bg-canvas{
  opacity: 0.32;
  filter: blur(0.6px);
}
body.window-open .grid-overlay,
body.window-open .ambient-light{
  opacity: 0.5;
  transition: opacity 700ms ease;
}
.ambient-light{
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  left: var(--mx, 50%);
  top: var(--my, 40%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(var(--atmo-orbit-rgb),0.06) 0%, rgba(var(--atmo-orbit-rgb),0.02) 38%, transparent 70%);
  pointer-events: none;
  transition: left 900ms linear, top 900ms linear, background var(--atmo-transition) ease;
}
/* Phase 7: Admin → Settings → Appearance → Mouse parallax off. Gates this
   ambient mouse-follow glow; the matching per-star canvas "nudge" effect
   is gated in script.js's draw loop (same toggle, SETTINGS.appearance.
   parallaxEnabled — see that file for why these two count as one system). */
html[data-parallax="off"] .ambient-light{ display: none; }
.grid-overlay{
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 70% at 50% 40%, black 30%, transparent 85%);
}
.noise-overlay{
  position: absolute;
  inset: -100px;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}
.vignette{
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* =========================================================
   Scene
   ========================================================= */
.scene{
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--edge);
  overflow-x: hidden;
}

.scene-meta{
  position: fixed;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0;
  animation: fade-in-meta 1200ms 600ms cubic-bezier(.16,.8,.24,1) forwards;
}
.scene-meta span:first-child{ color: var(--text-muted); }
.scene-meta--tl{ top: calc(var(--edge) + env(safe-area-inset-top, 0px)); left: calc(var(--edge) + env(safe-area-inset-left, 0px)); }
.scene-meta--tr{ top: calc(var(--edge) + env(safe-area-inset-top, 0px)); right: calc(var(--edge) + env(safe-area-inset-right, 0px)); text-align: right; align-items: flex-end; gap: 10px; max-width: 46vw; }
.scene-meta__row{ display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

@keyframes fade-in-meta{ to{ opacity: 1; } }

@media (max-width: 720px){
  .scene-meta--tr{ display: flex; }
  .scene-meta__row{ display: none; }
}

/* ---- language switch ---- */
.lang-switch{
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  pointer-events: auto;
  opacity: 0;
  animation: fade-in-meta 1200ms 700ms cubic-bezier(.16,.8,.24,1) forwards;
}
.lang-switch__sep{ color: var(--text-faint); }
.lang-switch__btn{
  color: var(--text-faint);
  transition: color var(--transition-fast);
  padding: 2px 1px;
}
.lang-switch__btn:hover{ color: var(--text-muted); }
.lang-switch__btn[aria-pressed="true"]{ color: var(--accent); }

/* =========================================================
   Hub field (orbit + center)
   ========================================================= */
.hub-field{
  position: relative;
  width: min(100%, 900px);
  aspect-ratio: 1 / 1;
  max-height: 82svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring{
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.055);
  pointer-events: none;
  opacity: 1;
  transition: opacity 900ms cubic-bezier(.16,.8,.24,1),
              width 900ms cubic-bezier(.16,.8,.24,1),
              height 900ms cubic-bezier(.16,.8,.24,1);
}
.orbit-ring--outer{
  width: calc(var(--orbit-radius) * 2 + 92px);
  height: calc(var(--orbit-radius) * 2 + 92px);
  animation: rotate-slow 240s linear infinite;
  border-style: dashed;
  border-color: rgba(255,255,255,0.045);
}
.orbit-ring--inner{
  width: calc(var(--orbit-radius) * 2 - 40px);
  height: calc(var(--orbit-radius) * 2 - 40px);
  animation: rotate-slow-reverse 180s linear infinite;
}
.hub-field.is-collapsing .orbit-ring,
.hub-field.is-collapsed .orbit-ring{
  opacity: 0;
  width: 20%;
  height: 20%;
}
.hub-field.is-collapsing .orbit-ring--outer,
.hub-field.is-collapsed .orbit-ring--outer{
  animation-duration: 60s;
}
@keyframes rotate-slow{ to{ transform: rotate(360deg); } }
@keyframes rotate-slow-reverse{ to{ transform: rotate(-360deg); } }

/* ---- central hub button ---- */
.hub{
  position: relative;
  z-index: 3;
  width: var(--hub-size);
  height: var(--hub-size);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: radial-gradient(circle at 50% 35%, var(--surface-light) 0%, var(--surface) 70%);
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 0 0 rgba(201,162,77,0);
}
.hub__ring{
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color var(--transition), transform var(--transition);
}
.hub:hover, .hub:focus-visible{
  transform: scale(1.035);
  border-color: var(--border-strong);
  box-shadow: 0 0 60px -8px rgba(201,162,77,0.18);
}
.hub:hover .hub__ring, .hub:focus-visible .hub__ring{
  border-color: var(--accent-line);
  transform: scale(1.08);
}
.hub-field.is-collapsing .hub,
.hub-field.is-expanding .hub{
  border-color: var(--accent-line);
}
.hub-field.is-collapsed .hub{
  transform: scale(0.86);
  animation: hub-breathe 4200ms ease-in-out infinite;
}
.hub-field.is-collapsed .hub__ring{
  border-color: var(--accent-line);
  animation: hub-ring-pulse 4200ms ease-in-out infinite;
}
@keyframes hub-breathe{
  0%, 100%{ box-shadow: 0 0 0 0 rgba(201,162,77,0); }
  50%{ box-shadow: 0 0 42px -6px rgba(201,162,77,0.22); }
}
@keyframes hub-ring-pulse{
  0%, 100%{ transform: scale(1); opacity: 0.55; }
  50%{ transform: scale(1.12); opacity: 1; }
}
.hub__mark{
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}
.hub__word{
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  margin-top: 6px;
}
.hub__tld{
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--accent);
}

.hub-caption{
  position: absolute;
  bottom: calc(-1 * clamp(48px, 8vh, 76px));
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.hub-caption p{
  font-family: var(--font-mono);
  font-size: clamp(9px, 1vw, 10.5px);
  letter-spacing: 0.16em;
  color: var(--text-faint);
  text-transform: uppercase;
  transition: opacity 500ms ease;
}
.hub-field.is-collapsing .hub-caption p,
.hub-field.is-collapsed .hub-caption p{ opacity: 0; }
body.window-open .scroll-hint,
.hub-field.is-collapsed ~ .scroll-hint{ opacity: 0; }

/* ---- orbit navigation ---- */
.orbit{
  position: absolute;
  inset: 0;
}
.orbit-item{
  position: absolute;
  top: 50%;
  left: 50%;
  --r: var(--orbit-radius);
  --spin: 0deg;
  --item-scale: 1;
  transform: rotate(calc(var(--angle) + var(--spin))) translateX(var(--r)) rotate(calc(-1 * (var(--angle) + var(--spin)))) translate(-50%, -50%) scale(var(--item-scale));
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 4px;
  opacity: 1;
  transition: transform 260ms cubic-bezier(.16,.8,.24,1), --r 780ms cubic-bezier(.4,0,.2,1), --spin 780ms cubic-bezier(.4,0,.2,1), --item-scale 780ms cubic-bezier(.4,0,.2,1), opacity 620ms cubic-bezier(.4,0,.2,1);
}
.hub-field.is-collapsing .orbit-item,
.hub-field.is-collapsed .orbit-item{
  --r: 0px;
  --spin: 42deg;
  --item-scale: 0.2;
  opacity: 0;
  pointer-events: none;
}
.hub-field.is-expanding .orbit-item{
  --spin: 0deg;
}
.orbit-item__index{
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  transition: color var(--transition-fast);
}
.orbit-item__label{
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.orbit-item__label::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}
.orbit-item:hover, .orbit-item:focus-visible{
  transform: rotate(var(--angle)) translateX(calc(var(--orbit-radius) + 4px)) rotate(calc(-1 * var(--angle))) translate(-50%, -50%);
}
.orbit-item:hover .orbit-item__label,
.orbit-item:focus-visible .orbit-item__label{
  color: var(--text);
}
.orbit-item:hover .orbit-item__index,
.orbit-item:focus-visible .orbit-item__index{
  color: var(--accent);
}
.orbit-item:hover .orbit-item__label::after,
.orbit-item:focus-visible .orbit-item__label::after{
  transform: scaleX(1);
}
.orbit-item.is-active .orbit-item__label{ color: var(--accent-bright); }

.scroll-hint{
  position: fixed;
  bottom: calc(var(--edge) + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  opacity: 0;
  animation: fade-in-meta 1200ms 1400ms cubic-bezier(.16,.8,.24,1) forwards;
}

/* =========================================================
   Mobile hub-field layout — radial nav around the hub
   (reuses the desktop orbit transform mechanics: same --angle/
   --r/--spin/--item-scale custom properties, same open/close
   classes, same transition timing — only the geometry and
   item sizing change for touch/small viewports)
   ========================================================= */
@media (max-width: 780px){
  .hub-field{
    --orbit-radius: clamp(84px, 30vw, 138px);
    --hub-size: clamp(86px, 22vw, 116px);
    width: min(100%, 380px);
    max-height: 78svh;
  }
  .orbit-ring{ display: none; }

  .hub-caption{
    bottom: calc(-1 * clamp(38px, 8vh, 58px));
    max-width: min(90vw, 320px);
    padding: 0 8px;
    white-space: normal;
  }

  /* seven-point radial layout tuned for mobile, evenly spaced (360/7)
     starting at top and going clockwise — matches the data-index
     already present on each .orbit-item, so no markup or JS changes
     are needed. */
  .orbit-item[data-index="0"]{ --angle: -90deg !important; } /* about — top */
  .orbit-item[data-index="1"]{ --angle: -39deg !important; } /* services */
  .orbit-item[data-index="2"]{ --angle: 13deg !important; }  /* web projects */
  .orbit-item[data-index="3"]{ --angle: 64deg !important; }  /* case studies */
  .orbit-item[data-index="4"]{ --angle: 116deg !important; } /* references */
  .orbit-item[data-index="5"]{ --angle: 167deg !important; } /* blog */
  .orbit-item[data-index="6"]{ --angle: 219deg !important; } /* contact */

  .orbit-item{
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 92px;
    padding: 8px 2px;
    text-align: center;
  }
  .orbit-item__label{
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
  .orbit-item__index{ font-size: 9px; }
  .orbit-item__label::after{ bottom: -3px; }

  /* disable the desktop hover "nudge" — on touch screens :hover
     can stick after a tap, which would otherwise leave an item
     visibly offset from the rest of the ring */
  .orbit-item:hover, .orbit-item:focus-visible{
    transform: rotate(var(--angle)) translateX(var(--orbit-radius)) rotate(calc(-1 * var(--angle))) translate(-50%, -50%);
  }

  .scroll-hint{ display: none; }
}

/* ---- tighter fit for the smallest phones ---- */
@media (max-width: 380px){
  .hub-field{
    --orbit-radius: clamp(70px, 27vw, 100px);
    --hub-size: clamp(76px, 20vw, 96px);
  }
  .orbit-item{ width: 78px; padding: 6px 2px; }
  .orbit-item__index{ font-size: 8.5px; }
  .orbit-item__label{ font-size: 10.5px; }
  .hub-caption p{ font-size: 8.5px; letter-spacing: 0.12em; }
}

/* ---- short / landscape phones: reclaim vertical space, widen the ring ---- */
@media (max-width: 900px) and (max-height: 480px) and (pointer: coarse){
  .hub-field{
    --orbit-radius: clamp(64px, 15vh, 96px);
    --hub-size: clamp(64px, 13vh, 84px);
    width: min(100%, 74vh);
    max-height: 90svh;
  }
  .hub-caption{ bottom: calc(-1 * clamp(22px, 5vh, 34px)); }
  .orbit-item{ width: 74px; }
  .orbit-item__label{ font-size: 10px; }
}

/* =========================================================
   Window layer
   ========================================================= */
.window-layer{
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vh, 48px) var(--edge);
  visibility: hidden;
  pointer-events: none;
}
.window-layer.is-open{
  visibility: visible;
  pointer-events: auto;
}
.window-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(6,6,7,0.5);
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  opacity: 0;
  transition: opacity var(--transition), backdrop-filter var(--transition);
}
.window-layer.is-open .window-backdrop{
  opacity: 1;
  backdrop-filter: blur(9px) saturate(88%);
  -webkit-backdrop-filter: blur(9px) saturate(88%);
}

.window{
  position: relative;
  width: min(74vw, 1200px);
  height: 80vh;
  max-height: 860px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface-glass), rgba(15,15,17,0.86));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02) inset;
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
}
.window-layer.is-open .window{
  opacity: 1;
  transform: scale(1) translateY(0);
}

.window__header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.window__eyebrow{
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.window__title{
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.window__close{
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}
.window__close:hover{
  color: var(--text);
  border-color: var(--border-strong);
  transform: rotate(90deg);
}
.window__body{
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 34px 36px 48px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  transition: opacity 220ms ease;
}
.window__body.is-fading{ opacity: 0; }
.window__body::-webkit-scrollbar{ width: 6px; }
.window__body::-webkit-scrollbar-thumb{ background: var(--border-strong); border-radius: 10px; }

@media (max-width: 780px){
  .window-layer{ padding: 0; }
  .window{
    width: 100%;
    height: 100vh;
    height: 100dvh;
    height: 100svh;
    max-height: none;
    border-radius: 0;
  }
  .window__header{ padding: calc(22px + env(safe-area-inset-top, 0px)) 20px 16px; }
  .window__body{ padding: 24px 20px calc(40px + env(safe-area-inset-bottom, 0px)); }
}

/* =========================================================
   Shared content typography
   ========================================================= */
.copy-lede{
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--text);
  max-width: 62ch;
  font-weight: 400;
}
.copy-body{
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 62ch;
}
.copy-body + .copy-body{ margin-top: 14px; }

.section-block + .section-block{
  margin-top: 46px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.section-kicker{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
  display: block;
}
.section-heading{
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 600;
  margin-bottom: 16px;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px 48px;
}
@media (max-width: 640px){ .about-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   SERVICES
   ========================================================= */
.services-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
@media (max-width: 900px){ .services-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .services-grid{ grid-template-columns: 1fr; } }

.service-card{
  background: var(--surface);
  padding: 26px 24px;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}
.service-card:hover, .service-card.is-open{ background: var(--surface-light); }
.service-card__num{
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.service-card__title{
  margin-top: 14px;
  font-size: 15.5px;
  font-weight: 600;
}
.service-card__desc{
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
.service-card__detail{
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--transition), opacity var(--transition);
}
.service-card.is-open .service-card__detail{
  max-height: 200px;
  opacity: 1;
}
.service-card__toggle{
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

/* =========================================================
   CASE STUDIES
   ========================================================= */
.case-list{ display: flex; flex-direction: column; }
.case-item{
  padding: 26px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
}
.case-item:first-child{ border-top: none; }
.case-item__tag{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-top: 3px;
}
.case-item__title{ font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.case-item__meta{
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.case-item__fields{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.case-field__label{
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.case-field__value{ font-size: 13px; line-height: 1.6; color: var(--text-muted); }

@media (max-width: 640px){
  .case-item{ grid-template-columns: 1fr; }
  .case-item__fields{ grid-template-columns: 1fr; }
}

/* =========================================================
   REFERENCES
   ========================================================= */
.ref-notice{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 28px;
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
}
.ref-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
@media (max-width: 640px){ .ref-grid{ grid-template-columns: 1fr; } }
.ref-card{ background: var(--surface); padding: 28px 26px; }
.ref-card__quote{
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  font-weight: 400;
}
.ref-card__quote::before{ content: "“"; color: var(--accent); }
.ref-card__quote::after{ content: "”"; color: var(--accent); }
.ref-card__byline{
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* =========================================================
   WEB PROJECTS
   ========================================================= */
.project-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 30px;
}
@media (max-width: 700px){ .project-grid{ grid-template-columns: 1fr; } }
.project-card{
  display: block;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.project-card__media{
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(201,162,77,0.14), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 26px),
    var(--surface-light);
  background-size: cover;
  background-position: center;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
/* Real client screenshots (like CoffeeMoon's) are set as this element's
   own background-image via an inline style in renderWebProjects() — the
   hover scale below zooms that image together with the card, a common
   agency-portfolio touch. Cards with no cover image yet just get the
   same subtle lift/glow on the placeholder pattern instead. */
.project-card:hover .project-card__media{
  border-color: var(--accent-line);
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.project-card__featured{
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #17140c;
  background: var(--accent-bright);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.project-card__category{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.project-card__title{
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 10px;
  transition: color var(--transition-fast);
}
.project-card:hover .project-card__title{ color: var(--accent-bright); }
.project-card__desc{
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
}
.project-card__chips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.project-card__chip{
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  text-transform: uppercase;
}
.project-card__link{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  transition: gap var(--transition-fast);
}
.project-card__link::after{ content: "→"; transition: transform var(--transition-fast); }
.project-card:hover .project-card__link{ gap: 9px; }
.project-card:hover .project-card__link::after{ transform: translateX(2px); }

/* =========================================================
   BLOG
   ========================================================= */
.blog-featured{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 34px;
  cursor: pointer;
}
@media (max-width: 700px){ .blog-featured{ grid-template-columns: 1fr; } }
.blog-media{
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(201,162,77,0.14), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 26px),
    var(--surface-light);
  background-size: cover;
  background-position: center;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.blog-featured .blog-media{ aspect-ratio: 4/3; }
/* Same lift/glow-on-hover agency-portfolio touch as .project-card__media
   (Phase 2) — applied here in Phase 4 for visual consistency across every
   clickable card type on the site. */
.blog-featured:hover .blog-media,
.blog-card:hover .blog-media{
  border-color: var(--accent-line);
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.blog-tag{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.blog-featured__title{
  margin-top: 12px;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  transition: color var(--transition-fast);
}
.blog-featured__excerpt{
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}
.blog-meta{
  margin-top: 16px;
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.blog-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 30px;
}
@media (max-width: 700px){ .blog-grid{ grid-template-columns: 1fr; } }
.blog-card{ cursor: pointer; }
.blog-card .blog-media{ margin-bottom: 14px; }
.blog-card__title{
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 10px;
  transition: color var(--transition-fast);
}
.blog-card:hover .blog-card__title{ color: var(--accent-bright); }
.blog-card__excerpt{
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
}
.blog-featured:hover .blog-featured__title{ color: var(--accent-bright); }

.article-back{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 26px;
  transition: color var(--transition-fast), gap var(--transition-fast);
}
.article-back:hover{ color: var(--accent); gap: 12px; }
.article-hero{
  aspect-ratio: 21/9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 26px;
  background:
    radial-gradient(circle at 70% 30%, rgba(201,162,77,0.16), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 26px),
    var(--surface-light);
}
.article-title{
  font-size: clamp(21px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  margin: 14px 0 16px;
}
.article-body p{
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 66ch;
}
.related-heading{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.related-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 700px){ .related-grid{ grid-template-columns: 1fr; } }
.related-card{ cursor: pointer; }
.related-card .blog-media{ aspect-ratio: 16/10; margin-bottom: 10px; }
.related-card__title{ font-size: 13.5px; font-weight: 600; line-height: 1.4; transition: color var(--transition-fast); }
.related-card:hover .blog-media{
  border-color: var(--accent-line);
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.related-card:hover .related-card__title{ color: var(--accent-bright); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-layout{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
@media (max-width: 700px){ .contact-layout{ grid-template-columns: 1fr; gap: 36px; } }

.contact-methods{ margin-top: 30px; display: flex; flex-direction: column; }
.contact-method{
  position: relative;
  z-index: 1;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  border-top: 1px solid var(--border);
  transition: transform var(--transition-fast), padding var(--transition-fast);
}
.contact-method:last-child{ border-bottom: 1px solid var(--border); }
.contact-method:hover, .contact-method:focus-visible{
  transform: translateX(3px);
}
.contact-method__id{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.contact-method__icon{
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: flex;
  color: var(--text-faint);
  transition: color var(--transition-fast);
}
.contact-method__icon svg{ width: 100%; height: 100%; display: block; }
.contact-method:hover .contact-method__icon,
.contact-method:focus-visible .contact-method__icon{
  color: var(--accent);
}
.contact-method__label{
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  white-space: nowrap;
}
.contact-method__value{
  font-size: 14px;
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
  transition: color var(--transition-fast);
}
.contact-method:hover .contact-method__value,
.contact-method:focus-visible .contact-method__value{
  color: var(--accent-bright);
}

@media (max-width: 480px){
  .contact-method{ gap: 10px; }
  .contact-method__id{ gap: 8px; }
  .contact-method__value{ font-size: 12.5px; max-width: 46vw; }
}

.form-field{ margin-bottom: 18px; }
.form-field label{
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.form-field input, .form-field textarea, .form-field select{
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  resize: vertical;
}
.form-field select{
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%), linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus{
  border-color: var(--accent-line);
  outline: none;
  background-color: var(--surface-light);
}

/* ---- optional file attachment ---- */
.form-file{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.form-file__input{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.form-file__button{
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.form-file__button:hover{ border-color: var(--accent-line); color: var(--accent-bright); }
.form-file__input:focus-visible + .form-file__button,
.form-file__button:has(+ .form-file__input:focus-visible){
  border-color: var(--accent-line);
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
.form-file__name{
  font-size: 13px;
  color: var(--text-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}
.form-file__hint{
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}
.form-file__error{
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #d98a6b;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity var(--transition-fast);
}
.form-file__error.is-visible{ opacity: 1; height: auto; }

/* ---- selected-files list (multi-file upload) ---- */
.form-file__list{
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.form-file__list-item{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
}
.form-file__list-item__check{
  flex: 0 0 auto;
  color: var(--accent-bright);
}
.form-file__list-item__name{
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.form-file__list-item__remove{
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: var(--text-faint);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  padding: 2px 6px;
  transition: color var(--transition-fast);
}
.form-file__list-item__remove:hover{ color: #e5484d; }

.form-submit{
  margin-top: 6px;
  padding: 13px 26px;
  border: 1px solid var(--accent-line);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-bright);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.form-submit:hover{ background: var(--accent-soft); }
.form-note{
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
}
.form-status{
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.form-status.is-visible{ opacity: 1; transform: translateY(0); }
.form-status.is-error{ color: #e5484d; }

/* Honeypot field — present for spam bots, invisible/unreachable for real
   users. Not display:none (some bots skip those) but fully off-screen
   and unfocusable. */
.form-honeypot{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.form-field.has-error input,
.form-field.has-error textarea,
.form-field.has-error select{
  border-color: #e5484d;
}

@media (max-width: 480px){
  .form-file{ gap: 10px; }
  .form-file__button{ width: 100%; text-align: center; }
  .form-file__name{ width: 100%; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  /* :not(.force-motion) lets Admin → Settings → Appearance → Reduced
     Motion → "Force off" (see script.js's applyReducedMotionOverride())
     override a visitor's own OS-level preference for every visitor, per
     Phase 7. Automatic (the default, no class ever added in that case)
     behaves exactly as before — zero regression for the common case. */
  html:not(.force-motion) *,
  html:not(.force-motion) *::before,
  html:not(.force-motion) *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html:not(.force-motion) .orbit-ring--outer,
  html:not(.force-motion) .orbit-ring--inner{ animation: none; }
}
/* Admin → Settings → Appearance → Reduced Motion → "Force on": minimizes
   animation for every visitor regardless of their own OS preference.
   Mirrors the media-query rules above exactly (same declarations), just
   not gated by prefers-reduced-motion. */
html.force-reduced-motion *,
html.force-reduced-motion *::before,
html.force-reduced-motion *::after{
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
html.force-reduced-motion .orbit-ring--outer,
html.force-reduced-motion .orbit-ring--inner{ animation: none !important; }

/* =========================================================
   Maintenance mode (served by root index.php when enabled) —
   deliberately minimal, reuses the same design tokens as the main site
   rather than duplicating its animated orbital interface.
   ========================================================= */
.maintenance-screen{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(201,162,77,0.08), transparent 60%),
    var(--background);
  color: var(--text);
  font-family: var(--font-display);
  text-align: center;
}
.maintenance-card{ max-width: 460px; }
.maintenance-card__mark{
  width: 52px; height: 52px;
  margin: 0 auto 24px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  color: var(--accent-bright);
  font-size: 20px;
}
.maintenance-card__title{ font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.maintenance-card__message{ font-size: 15px; line-height: 1.6; color: var(--text-muted); margin-bottom: 26px; }
.maintenance-card__lang{
  display: inline-flex; gap: 8px; font-family: var(--font-mono); font-size: 12.5px;
}
.maintenance-card__lang a{ color: var(--text-faint); text-decoration: none; }
.maintenance-card__lang a.is-active{ color: var(--accent-bright); font-weight: 600; }

/* =========================================================
   Casual copy deterrence — decorative/atmospheric chrome only.
   Never applied to real content: article/blog text, contact details,
   form inputs, textareas, or links all stay fully selectable/copyable.
   Matches script.js's copyDeterrence() IIFE; same "deterrence, not
   security" caveat applies — see that comment for the full rationale.
   ========================================================= */
[aria-hidden="true"],
.scene-meta,
.hub,
.hub-field,
.orbit-ring,
.cursor-dot,
.cursor-ring,
.grid-overlay,
.noise-overlay,
.vignette,
.ambient-light{
  -webkit-user-select: none;
  user-select: none;
}
