@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/chakra-petch-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Tomorrow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/tomorrow-400-latin.woff2") format("woff2"); }
:root {
  color-scheme: light;

  /* light (also the default when the visitor has no preference) */
  --bg: #f6eee5;  --bg-raised: #fcf8f3;
  --scene-image: url("backgrounds/avor-forge-selected-light.png");
  --scene-rgb: 246 238 229;
  --text: #1c1210; --text-2: #5f514a; --text-3: #706158;
  --logo: #9c7a52;
  --ox: #74191f; --ox-hover: #5e1218; --on-ox: #fbefe7; --ox-text: #74191f;
  --line: rgb(116 25 31 / 0.35); --line-strong: #74191f;
  --scrim: rgb(28 18 16 / 0.40);

  --font-head: "Chakra Petch", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-read: "Tomorrow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type: golden half-steps from 12px (x 1.272) */
  --step-0: 0.75rem;  --step-1: 0.954rem; --step-2: 1.214rem;
  --step-5: 2.498rem; --step-6: 3.177rem; --step-7: 4.041rem; --step-8: 5.141rem;
  --display: var(--step-5);
  --lh-read: 1.618; --lh-title: 1.272; --lh-display: 1.03;

  /* space: golden steps */
  --s5: 5px; --s8: 8px; --s13: 13px; --s21: 21px; --s34: 34px; --s55: 55px; --s89: 89px;
  --edge: var(--s21); --gutter: var(--s21);
  --cut: 8px;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --t-fast: 120ms; --t: 220ms; --breath: 10s;
}

@media (min-width: 820px)  { :root { --display: var(--step-6); --edge: var(--s34); --gutter: var(--s34); } }
@media (min-width: 1280px) { :root { --display: var(--step-7); --edge: var(--s55); } }
@media (min-width: 1600px) { :root { --display: var(--step-8); --edge: var(--s89); } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #120d0c;  --bg-raised: #1c1614;
    --scene-image: url("backgrounds/avor-forge-selected-dark.png");
    --scene-rgb: 18 13 12;
    --text: #f5ece4; --text-2: #c2b3a8; --text-3: #9a8c81;
    --logo: #cdb693;
    --ox: #9b2c36; --ox-hover: #ae3340; --on-ox: #fbefe7; --ox-text: #d35c66;
    --line: rgb(155 44 54 / 0.45); --line-strong: #9b2c36;
    --scrim: rgb(10 7 6 / 0.74);
  }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #120d0c;  --bg-raised: #1c1614;
    --scene-image: url("backgrounds/avor-forge-selected-dark.png");
    --scene-rgb: 18 13 12;
    --text: #f5ece4; --text-2: #c2b3a8; --text-3: #9a8c81;
    --logo: #cdb693;
    --ox: #9b2c36; --ox-hover: #ae3340; --on-ox: #fbefe7; --ox-text: #d35c66;
    --line: rgb(155 44 54 / 0.45); --line-strong: #9b2c36;
    --scrim: rgb(10 7 6 / 0.74);
  }
* { box-sizing: border-box; }
html { overflow-x: clip; font-size: 16px; background: var(--bg); }
body { overflow-x: clip; margin: 0; color: var(--text); font-family: var(--font-read); font-weight: 400; font-size: var(--step-1); line-height: var(--lh-read); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ox-text); outline-offset: 3px; }
/* Selected founder scene: crop and readability treatments follow appearance tokens. */
.background {
  position: fixed; inset: 0; z-index: -1;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgb(var(--scene-rgb) / .82) 0%, rgb(var(--scene-rgb) / .78) 9%, rgb(var(--scene-rgb) / 0) 20%),
    linear-gradient(90deg, rgb(var(--scene-rgb) / .46) 0%, rgb(var(--scene-rgb) / .28) 38%, rgb(var(--scene-rgb) / 0) 66%),
    linear-gradient(0deg, rgb(var(--scene-rgb) / .94) 0%, rgb(var(--scene-rgb) / .80) 16%, rgb(var(--scene-rgb) / 0) 43%),
    var(--scene-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page { overflow-x: clip; min-height: 100svh; padding: 21px var(--edge); display: flex; flex-direction: column; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.header { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 21px; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 21px; }
.theme-button { flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.theme-button:hover { color: var(--text); border-color: var(--line-strong); }
/* Keep the header footprint stable until the local script enables the control. */
.theme-button[hidden] { display: grid !important; visibility: hidden; }
.theme-button svg { grid-area: 1 / 1; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
.brand { grid-column: 1 / 7; justify-self: start; display: inline-flex; align-items: center; gap: 13px; font-family: var(--font-head); font-weight: 600; font-size: var(--step-0); line-height: 1; letter-spacing: .22em; }
.brand svg { display: block; width: 34px; fill: var(--logo); }
.header-email { grid-column: 7 / 13; justify-self: end; color: var(--text-2); }
.main { flex: 1; display: flex; flex-direction: column; }
.hero { flex: 1; align-items: center; min-height: 0; }
.copy { grid-column: 1 / 7; padding: 21px 0; }
h1 { font-family: var(--font-head); font-weight: 600; font-size: var(--display); line-height: var(--lh-display); letter-spacing: -.015em; text-wrap: balance; }
.lede { margin-top: 21px; max-width: 31em; color: var(--text-2); font-size: var(--step-2); line-height: var(--lh-read); text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; align-items: center; column-gap: 34px; row-gap: 21px; margin-top: 34px; }
.primary { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 13px; height: 55px; padding: 0 21px; font-family: var(--font-head); font-weight: 600; font-size: var(--step-1); line-height: 1; letter-spacing: .01em; color: var(--on-ox); transition: transform var(--t-fast) var(--ease); }
.primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ox); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); transition: background var(--t) var(--ease); }
.primary:hover::before { background: var(--ox-hover); }
.primary svg { flex: none; transition: transform var(--t) var(--ease); }
.primary:hover svg { transform: translateX(3px); }
.primary:active { transform: translateY(1px); }
.stage { grid-column: 7 / 13; position: relative; align-self: stretch; min-height: 233px; }
/* how far the 3D logo may reach past its stage on each side; it shrinks below its chosen size to stay within this */
.stage { --mark-room-top: 13px; --mark-room-right: 13px; --mark-room-bottom: 21px; --mark-room-left: 17px; }
@media (min-width: 1280px) { .stage { --mark-room-right: 34px; } }
@media (min-width: 1600px) { .stage { --mark-room-right: 68px; } }
.flat-mark { visibility: hidden; position: absolute; inset: 0; display: grid; place-items: center; }
.flat-mark svg { width: 78.6%; height: auto; fill: var(--logo); }
.mark-canvas { position: absolute; width: calc(100% + 140px); height: calc(100% + 140px); left: -70px; top: -70px; pointer-events: none; opacity: 0; }
.stage.no-webgl .flat-mark { visibility: visible; }
.stage.no-webgl .mark-canvas { opacity: 0; }
.stage.ready .mark-canvas { opacity: 1; }
.stage.grab { cursor: grab; }
.stage.grabbing { cursor: grabbing; }
.services { border-top: 1px solid var(--line); padding: 21px 0; align-items: baseline; }
.label { grid-column: 1 / 4; color: var(--ox-text); font-family: var(--font-head); font-weight: 600; font-size: var(--step-0); line-height: 1; letter-spacing: .18em; text-transform: uppercase; }
.service-1 { grid-column: 4 / 7; }
.service-2 { grid-column: 7 / 10; }
.service-3 { grid-column: 10 / 13; }
.service h3 { font-family: var(--font-head); font-weight: 600; font-size: var(--step-1); line-height: var(--lh-title); }
.service p { margin-top: 5px; color: var(--text-2); font-size: var(--step-1); line-height: var(--lh-read); }
.footer { border-top: 1px solid var(--line); padding-top: 13px; color: var(--text-3); font-size: var(--step-0); line-height: var(--lh-read); align-items: center; }
.footer p { grid-column: 1 / 10; }
.footer nav { grid-column: 10 / 13; justify-self: end; display: flex; gap: 21px; }
.text-link { position: relative; transition: color var(--t) var(--ease); }
.text-link::after { content: ""; position: absolute; height: 1px; left: 0; right: 0; bottom: -3px; background: var(--ox-text); transform-origin: left; transform: scaleX(0); transition: transform var(--t) var(--ease); }
.text-link:hover { color: var(--text); }
.text-link:hover::after { transform: scaleX(1); }
.privacy { position: fixed; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 21px; }
.privacy:target { display: flex; }
.privacy-scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.privacy-panel { position: relative; max-width: 610px; width: 100%; max-height: 84svh; overflow-y: auto; padding: 34px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text-2); }
.privacy-panel:focus { outline: none; }
.privacy-panel h2 { font-family: var(--font-head); font-weight: 600; font-size: var(--step-2); line-height: var(--lh-title); color: var(--text); }
.privacy-panel p { margin-top: 21px; }
.privacy-panel > a { display: inline-block; margin-top: 21px; }
body.privacy-open { overflow: hidden; }
@media (max-width: 819px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .header { margin-bottom: 13px; }
  .header-email { display: none; }
  .brand { grid-column: 1; }
  .hero { flex: none; }
  .stage { grid-column: 1; grid-row: 1; height: clamp(144px, 23svh, 233px); min-height: 0; }
  .stage { --mark-room-top: 0px; --mark-room-right: 13px; --mark-room-bottom: -13px; --mark-room-left: 13px; }
  .copy { grid-column: 1; grid-row: 2; padding: 0 0 21px; }
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .service-1 { grid-column: 1; }.service-2 { grid-column: 2; }.service-3 { grid-column: 3; }
  .service p { display: none; }
  .footer { grid-template-columns: 1fr; row-gap: 13px; }
  .footer p, .footer nav { grid-column: 1; }
  .footer nav { justify-self: start; }
  .privacy-panel { padding: 21px; }
}
@media (max-width: 559px) {
  .lede { font-size: var(--step-1); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Keep the ring, tree and curved terrace in the phone's right-hand crop.
   The art fades to the existing page colour below the logo and behind copy. */
@media (max-width: 819px) {
  body { position: relative; }
  .background {
    position: absolute;
    background-image:
      linear-gradient(180deg, rgb(var(--scene-rgb) / .18) 0%, rgb(var(--scene-rgb) / .12) 24%, rgb(var(--scene-rgb) / .68) 37%, rgb(var(--scene-rgb) / .88) 56%, rgb(var(--scene-rgb) / .95) 76%, var(--bg) 100%),
      var(--scene-image);
    background-size: 100% 100svh, auto min(100svh, 620px);
    background-position: center top, right top;
  }
}

/* Project enquiry: hash-link fallback, enhanced with dialog focus management. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.enquiry { position: fixed; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 21px; }
.enquiry:target { display: flex; }
.enquiry-scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.enquiry-panel { position: relative; width: 100%; max-width: 720px; max-height: calc(100svh - 42px); max-height: calc(100dvh - 42px); overflow-y: auto; overscroll-behavior: contain; scroll-padding: 21px; padding: 34px; border: 1px solid var(--line); background: var(--bg-raised); }
.enquiry-panel:focus { outline: none; }
.enquiry-heading { display: flex; align-items: center; justify-content: space-between; gap: 21px; }
.enquiry-heading h2 { font-family: var(--font-head); font-size: var(--step-2); line-height: var(--lh-title); }
.enquiry-close { flex: none; min-height: 44px; display: inline-flex; align-items: center; }
#enquiry-intro { color: var(--text-2); margin: 8px 0 21px; }
.enquiry-fields { padding: 0; margin: 0; border: 0; display: grid; gap: 21px; min-width: 0; }
.enquiry-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px; }
.enquiry-field { min-width: 0; }
.enquiry-field label { display: block; margin-bottom: 8px; font-family: var(--font-head); line-height: var(--lh-title); }
.enquiry-field label span { color: var(--text-2); font-family: var(--font-read); font-size: var(--step-0); }
.enquiry-field input, .enquiry-field textarea { width: 100%; min-height: 44px; border: 1px solid var(--text-3); border-radius: 0; padding: 10px 13px; background: var(--bg); color: var(--text); font: 400 1rem/1.5 var(--font-read); scroll-margin-block: 21px; }
.enquiry-field textarea { display: block; resize: vertical; }
.enquiry-field input:focus-visible, .enquiry-field textarea:focus-visible { outline: 2px solid var(--ox-text); outline-offset: 3px; }
.enquiry-field [aria-invalid="true"] { border-color: var(--ox-text); }
.field-hint, .enquiry-notice { color: var(--text-2); font-size: var(--step-0); line-height: var(--lh-read); }
.field-hint { margin: -3px 0 8px; }
.enquiry-notice { margin-top: 21px; }
.enquiry-notice a { text-decoration: underline; text-underline-offset: 3px; }
.enquiry-status { margin-top: 13px; color: var(--text); }
.enquiry-status:empty { display: none; }
.enquiry-submit { margin-top: 21px; border: 0; background: transparent; cursor: pointer; }
.enquiry-submit:disabled { cursor: default; }
body.enquiry-open { overflow: hidden; }
@supports selector(body:has(.enquiry:target)) { body:has(.enquiry:target) { overflow: hidden; } }
@media (max-width: 559px) {
  .enquiry { padding: 8px; }
  .enquiry-panel { padding: 21px; max-height: calc(100svh - 16px); max-height: calc(100dvh - 16px); }
  .enquiry-row { grid-template-columns: minmax(0, 1fr); }
}
