/* Bahay3D website styles. Colours are at the top of the second section. */
/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Colours ---------- */
:root {
  --basalt: #1d2427;   /* text and dark areas */
  --concrete: #e7e5df; /* page background */
  --bead: #c4bfb5;     /* thin lines */
  --slate: #545e64;    /* secondary text */
  --yellow: #f2b01e;   /* buttons, taken from the robot arm */
  --white: #fbfbf9;
  --gutter: clamp(20px, 5vw, 64px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(1.02rem, .97rem + .25vw, 1.125rem);
  line-height: 1.65;
  color: var(--basalt);
  background: var(--concrete);
  -webkit-font-smoothing: antialiased;
}
img, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; }
p { margin: 0 0 1.1em; }
h1, h2 { margin: 0; font-stretch: 125%; font-weight: 800; letter-spacing: -.015em; line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.9rem); margin-bottom: .7em; max-width: 18ch; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 2px var(--basalt); border-radius: 2px; }
.wrap { width: min(1120px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }

/* ---------- Header (two links only) ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 10; color: #fff; }
.site-header--solid { position: static; background: var(--basalt); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand span { font-stretch: 125%; font-weight: 800; font-size: 1.25rem; }
.site-header nav { display: flex; gap: clamp(18px, 3vw, 32px); }
.site-header nav a { text-decoration: none; font-weight: 600; padding-block: 6px; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-bottom-color: rgba(255, 255, 255, .6); }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--yellow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .8em 1.4em;
  font: inherit; font-weight: 700; font-stretch: 112%; font-size: 1rem; line-height: 1.1;
  text-decoration: none; border-radius: 3px; border: 2px solid transparent;
}
.btn--yellow { background: var(--yellow); color: var(--basalt); }
.btn--yellow:hover { background: #ffc43d; }
.btn--line { border-color: currentColor; }
.btn--line:hover { background: rgba(127, 127, 127, .15); }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; color: #fff; background: var(--basalt); overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero picture img { object-fit: cover; object-position: 32% 55%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(270deg, rgba(18, 24, 27, .9) 0%, rgba(18, 24, 27, .7) 34%, rgba(18, 24, 27, 0) 70%),
    linear-gradient(180deg, rgba(18, 24, 27, .6) 0, rgba(18, 24, 27, 0) 150px);
}
.hero .wrap { position: relative; z-index: 2; display: flex; justify-content: flex-end; padding-block: 120px 110px; }
.hero__text { width: min(580px, 52%); }
.hero h1 { font-size: clamp(2.5rem, .9rem + 5vw, 5.4rem); line-height: .98; font-weight: 850; letter-spacing: -.02em; margin-bottom: .45em; max-width: 11ch; color: #f4f2ed; }
.hero p { font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem); line-height: 1.5; color: #e4e6e7; max-width: 34ch; margin-bottom: 1.8em; }
.hero__scroll { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%); color: rgba(255, 255, 255, .85); font-size: .9rem; text-decoration: none; display: grid; justify-items: center; gap: 6px; }
.hero__scroll::after { content: ""; width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.hero .hero__credit { position: absolute; z-index: 2; right: var(--gutter); bottom: 22px; margin: 0; font-size: .75rem; color: rgba(255, 255, 255, .7); }

/* The headline is filled with printed-concrete layer lines and "prints" upward when the page opens. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .print-type { color: transparent; background-image: repeating-linear-gradient(180deg, #f5f3ee 0, #f5f3ee .078em, #b9b2a5 .078em, #b9b2a5 .098em); -webkit-background-clip: text; background-clip: text; }
  .print-type--dark { background-image: repeating-linear-gradient(180deg, var(--basalt) 0, var(--basalt) .078em, #6d767b .078em, #6d767b .098em); }
}
.print-type { animation: print-up 1.4s steps(24, end) .15s both; }
@keyframes print-up { from { clip-path: inset(100% -2% -4% -2%); } to { clip-path: inset(-4% -2% -4% -2%); } }

@media (max-width: 820px) {
  .hero { display: block; min-height: 0; }
  .hero picture { position: relative; height: 56svh; min-height: 320px; }
  .hero::before { height: 56svh; min-height: 320px; background: linear-gradient(180deg, rgba(18, 24, 27, .6) 0, rgba(18, 24, 27, 0) 130px); }
  .hero .wrap { padding-block: 32px 64px; }
  .hero__text { width: 100%; }
  .hero__scroll { display: none; }
  .hero .hero__credit { position: static; padding: 0 var(--gutter) 24px; margin-top: -40px; }
}

/* ---------- The story ---------- */
.story { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem); }
.chapter { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 40rem); gap: 0 clamp(20px, 4vw, 56px); padding-block: clamp(2.6rem, 2rem + 3vw, 4.4rem); border-top: 1px solid var(--bead); }
.chapter:first-child { border-top: 0; padding-top: 0; }
.chapter__no { font-stretch: 125%; font-weight: 800; font-size: clamp(2.4rem, 1.8rem + 2vw, 3.6rem); line-height: .9; color: var(--bead); }
.chapter p:last-child { margin-bottom: 0; }
.chapter .note { font-size: .88rem; color: var(--slate); }
.steps { margin: 1.4em 0 0; padding-left: 1.3em; }
.steps li { padding-left: .3em; margin-bottom: .7em; }
.steps li::marker { font-weight: 800; font-stretch: 125%; }
.steps b { font-weight: 700; }
.photo { margin: clamp(1rem, .5rem + 2vw, 2rem) 0; }
.photo img { width: 100%; max-height: 640px; object-fit: cover; object-position: 44% 45%; border-radius: 2px; }
.photo figcaption { margin-top: .6rem; font-size: .85rem; color: var(--slate); }
@media (max-width: 700px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter__no { margin-bottom: .9rem; font-size: 2.2rem; }
}

/* ---------- Closing call to action ---------- */
.closing { background: var(--basalt); color: #fff; padding-block: clamp(4rem, 3rem + 5vw, 7rem); }
.closing h2 { color: #fff; }
.closing p { color: #d3d8da; max-width: 44ch; margin-bottom: 1.8em; }

/* ---------- Contact page ---------- */
.contact { padding-block: clamp(3.5rem, 2.5rem + 5vw, 7rem); }
.contact h1 { font-size: clamp(2.6rem, 1.2rem + 4.6vw, 4.8rem); line-height: 1; letter-spacing: -.02em; font-weight: 850; margin-bottom: .45em; color: var(--basalt); }
.contact__intro { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); line-height: 1.5; color: var(--slate); max-width: 40ch; margin-bottom: 2.6rem; }
.card { background: var(--white); border-top: 4px solid var(--yellow); padding: clamp(1.4rem, 1rem + 2vw, 2.4rem); max-width: 40rem; margin-bottom: 1.4rem; }
.card h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); margin-bottom: .2em; }
.card__role { color: var(--slate); margin-bottom: 1.2rem; }
.details { margin: 0 0 1.6rem; display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.4rem; }
.details dt { color: var(--slate); }
.details dd { margin: 0; font-weight: 600; word-break: break-word; }
.btn-dark-line { border-color: var(--basalt); color: var(--basalt); }
.where { max-width: 40rem; margin-top: 2.6rem; }
@media (max-width: 480px) { .details { grid-template-columns: 1fr; gap: 0; } .details dt { font-size: .88rem; margin-top: .6rem; } .details dt:first-child { margin-top: 0; } }
.where h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.7rem); margin-bottom: .4em; }

/* ---------- Footer ---------- */
.site-footer { background: #262e32; color: #aab2b6; font-size: .82rem; padding-block: 2rem 2.4rem; }
.site-footer p { margin: 0 0 .6em; max-width: 110ch; }
.site-footer a { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .print-type { animation: none; }
}
