/* ==========================================================================
   The Phenzo Interio: shared styles (every page)
   Tokens, fonts, reset, header + menu, footer, buttons, labels, animations.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL licensed) ---------- */
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-400-latin-ext.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-500-latin.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-500-latin-ext.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-600-latin.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-600-latin-ext.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Design tokens ---------- */
:root {
  /* Colours */
  --color-bg: #0a0a0a;
  --color-black: #000;
  --color-text: #f5f5f5;
  --color-muted: #a0a0a0;
  --color-soft: #d1d1d1;
  --color-line: rgba(245, 245, 245, 0.2);
  --color-line-strong: rgba(245, 245, 245, 0.25);
  --color-overlay: rgba(10, 10, 10, 0.3);
  --color-overlay-strong: rgba(10, 10, 10, 0.55);
  --color-button: #f5f5f5;
  --color-button-text: #0a0a0a;
  --color-brand: #c1401f;

  /* Fonts */
  --font-sans: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Type scale (mobile first; desktop values set in the media query below) */
  --text-display: 27px;     /* hero h1 */
  --text-h2: 24px;          /* section statements */
  --text-h3: 22px;          /* service titles */
  --text-h4: 18px;          /* small headings, FAQ questions */
  --text-body: 16px;
  --text-link: 18px;
  --text-mono: 14px;
  --text-mono-sm: 13px;
  --text-nav: 34px;         /* menu links */

  /* Spacing */
  --gutter: 19px;
  --section-space: 100px;
  --radius: 8px;
  --radius-pill: 999px;
  --header-h: 68px;
  --header-h-small: 52px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.8s;
}

@media (min-width: 810px) {
  :root {
    --text-display: 38px;
    --text-h2: 30px;
    --text-h3: 25px;
    --text-h4: 20px;
    --text-body: 18px;
    --text-nav: 40px;
    --section-space: 160px;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 500; }
:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 16px;
  background: var(--color-button); color: var(--color-button-text); border-radius: var(--radius-pill);
  transform: translateY(-150%); transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* ---------- Layout helpers ---------- */
.container { padding-inline: var(--gutter); }
.section { padding-block: var(--section-space); }
.divider { border: 0; border-top: 1px solid var(--color-line); }

/* ---------- Type helpers ---------- */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--text-mono); line-height: 1.6; letter-spacing: -0.01em;
}
.label::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--color-text); flex: none;
}
.mono { font-family: var(--font-mono); font-size: var(--text-mono-sm); line-height: 1.6; letter-spacing: -0.08em; }
.statement { font-size: var(--text-h2); line-height: 1.3; letter-spacing: -0.03em; font-weight: 500; }
.h4 { font-size: var(--text-h4); line-height: 1.4; letter-spacing: -0.04em; font-weight: 500; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px;
  background: var(--color-button); color: var(--color-button-text);
  border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 500; letter-spacing: -0.02em;
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
.btn:hover { transform: scale(1.04); }
.btn .plus { font-size: 22px; line-height: 1; }

/* "Text +" link with an underline, used for section links. */
.link-plus {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
  font-size: var(--text-link); line-height: 1.2;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  align-self: flex-start;
}
.link-plus .plus { font-size: 21px; line-height: 1; transition: transform 0.4s var(--ease); }
.link-plus:hover .plus { transform: rotate(90deg); }

/* Small "+" after list links (footer). */
/* 44px tall tap area, but rows sit 35px apart like the design. */
.list-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-block: -4.5px; }
.list-link::after { content: "+"; font-size: 14px; color: var(--color-muted); transition: transform 0.4s var(--ease); }
.list-link:hover::after { transform: rotate(90deg); color: var(--color-text); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--header-h); padding-inline: var(--gutter);
  transition: height 0.4s var(--ease), background-color 0.4s, backdrop-filter 0.4s;
}
.site-header.is-small {
  height: var(--header-h-small);
  background: rgba(10, 10, 10, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.site-header__logo {
  justify-self: start; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 18px; font-weight: 500; letter-spacing: -0.05em; white-space: nowrap;
}
.site-header__progress {
  font-size: 18px; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  display: none;
}
.site-header__menu-btn {
  grid-column: 3; justify-self: end; min-height: 44px; min-width: 44px;
  font-size: 18px; font-weight: 500; letter-spacing: -0.04em;
}
@media (min-width: 810px) {
  .site-header__progress { display: block; }
}

/* ---------- Full-screen menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 99;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
  background: rgba(10, 10, 10, 0.86);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease); }
.menu__inner { display: flex; flex-direction: column; gap: 40px; }
.menu__links a {
  display: inline-block; font-size: var(--text-nav); line-height: 1.3; letter-spacing: -0.04em;
  transform: translateY(24px); opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease), color 0.3s;
}
.menu__links a:hover, .menu__links a[aria-current="page"] { color: var(--color-muted); }
.menu.is-open .menu__links a { transform: none; opacity: 1; }
.menu.is-open .menu__links li:nth-child(2) a { transition-delay: 0.05s; }
.menu.is-open .menu__links li:nth-child(3) a { transition-delay: 0.1s; }
.menu.is-open .menu__links li:nth-child(4) a { transition-delay: 0.15s; }
.menu.is-open .menu__links li:nth-child(5) a { transition-delay: 0.2s; }
.menu.is-open .menu__links li:nth-child(6) a { transition-delay: 0.25s; }
.menu__social { display: flex; flex-direction: column; gap: 2px; }
.menu__social a { min-height: 44px; margin-block: -6px; display: inline-flex; align-items: center; font-size: 18px; color: var(--color-soft); }
.menu__social a:hover { color: var(--color-text); }
@media (min-width: 810px) {
  .menu__inner { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .menu__social { text-align: right; align-items: flex-end; }
}
body.menu-open { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { padding: 160px var(--gutter) 40px; }
.site-footer__grid { display: grid; gap: 40px; }
.site-footer__logo { width: 100px; height: 100px; margin-bottom: 14px; }
.site-footer__intro p { max-width: 380px; font-size: 18px; line-height: 1.6; }
.site-footer h2 { font-size: 20px; line-height: 1.4; letter-spacing: -0.04em; font-weight: 500; margin-bottom: 4px; }
.site-footer address { font-style: normal; font-size: 18px; line-height: 1.4; max-width: 250px; margin-bottom: 4px; }
.site-footer li { font-size: 18px; line-height: 1.4; }
.site-footer__bottom {
  margin-top: 50px; padding-top: 50px; border-top: 1px solid var(--color-line);
  text-align: center; font-family: var(--font-mono); font-size: var(--text-mono); letter-spacing: -0.01em;
}
.site-footer__credit { margin-top: 6px; color: var(--color-muted); }
/* Phones: room below the last line so the floating WhatsApp/Call buttons don't cover it. */
@media (max-width: 809px) { .site-footer { padding-bottom: 150px; } }
.site-footer__credit a {
  display: inline-block; padding-block: 12px; margin-block: -12px; /* 44px-tall tap area */
  color: var(--color-text); text-decoration: underline; text-underline-offset: 3px;
}
.site-footer__credit a:hover { color: var(--color-muted); }

/* Newsletter form (footer) */
.newsletter { position: relative; margin-top: 20px; max-width: 390px; }
.newsletter__field {
  display: flex; align-items: center; gap: 8px;
  height: 60px; padding: 0 7px 0 29px;
  border: 1px solid var(--color-line-strong); border-radius: var(--radius-pill);
}
.newsletter input {
  flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 16px;
}
.newsletter input::placeholder { color: var(--color-muted); }
.newsletter button {
  flex: none; height: 46px; padding: 0 22px; border-radius: var(--radius-pill);
  background: var(--color-soft); color: var(--color-button-text); font-size: 14px; font-weight: 600;
  transition: background-color 0.3s;
}
.newsletter button:hover { background: var(--color-text); }
.newsletter__field:focus-within { border-color: var(--color-text); }
.form-status { min-height: 1.6em; margin-top: 10px; font-size: 15px; color: var(--color-soft); }
.form-status.is-error { color: #ff8a73; }

@media (min-width: 810px) {
  .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 20px; }
  .site-footer__intro { padding-right: 60px; }
}

/* ---------- Page hero (full-screen photo, title at the bottom) ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--header-h) var(--gutter) 0;
  overflow: hidden; isolation: isolate;
}
.hero__media, .hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
}
.hero__media img { object-fit: cover; animation: hero-zoom 2.4s var(--ease) both; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(10,10,10,0) 55%, rgba(10,10,10,0.45) 100%);
}
/* Darker overlay for busy photos so the title stays readable. */
.hero--dim::after { background: linear-gradient(to bottom, rgba(10,10,10,0.35), rgba(10,10,10,0.55)); }
@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

.hero__content {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  margin-bottom: 24px; animation: fade-up 1.2s 0.3s var(--ease) both;
}
.hero__content .label { margin-bottom: 8px; }
.hero__title {
  max-width: 350px; margin: 0 auto;
  font-size: var(--text-display); line-height: 1.09; letter-spacing: -0.02em; font-weight: 600;
}
.hero__bottom {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding-bottom: 30px; animation: fade-up 1.2s 0.5s var(--ease) both;
}
.hero__bottom .hero__scroll { justify-self: end; }
.hero__bottom .mono { white-space: nowrap; font-size: 12px; }
.hero__cta { min-height: 48px; padding: 0 18px; font-size: 14px; gap: 8px; }

@media (min-width: 810px) {
  .hero__content { margin-bottom: 36px; }
  .hero__title { max-width: 470px; }
  .hero__title--wide { max-width: 560px; }
  .hero__bottom .mono { font-size: var(--text-mono-sm); }
  .hero__cta { min-height: 56px; padding: 0 24px; font-size: 16px; }
}

/* ---------- Closing call to action (photo + statement) ---------- */
.cta { position: relative; min-height: 840px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.cta__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 60%; z-index: -1; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--color-overlay-strong); }
.cta__content {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; padding-bottom: 120px;
}
.cta__content .statement { max-width: 440px; margin-bottom: 26px; }

@media (min-width: 810px) {
  .cta { min-height: 830px; }
  .cta__content { padding-bottom: 110px; }
}

/* ---------- Floating "Start a Project" button (desktop, after the hero) ---------- */
.floating-cta {
  position: fixed; left: 50%; bottom: 20px; z-index: 80;
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}
.floating-cta.is-shown { transform: translate(-50%, 0); opacity: 1; }
.floating-cta.is-shown:hover { transform: translate(-50%, 0) scale(1.04); }
@media (max-width: 809px) { .floating-cta { display: none; } }
body.menu-open .floating-cta { opacity: 0; pointer-events: none; }

/* ---------- Floating contact buttons (phones only) ---------- */
.quick-contact {
  position: fixed; right: var(--gutter); bottom: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
  transition: opacity 0.4s, transform 0.4s var(--ease);
}
.quick-contact a {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.quick-contact .quick-contact__wa { background: #25d366; color: #fff; }
.quick-contact .quick-contact__call { background: var(--color-button); color: var(--color-button-text); }
.quick-contact svg { width: 24px; height: 24px; }
body.menu-open .quick-contact { opacity: 0; pointer-events: none; }
@media (min-width: 810px) {
  .quick-contact { bottom: 84px; }
  .quick-contact__call { display: none !important; }
}

/* ---------- Scroll animations ---------- */
/* Elements with [data-reveal] fade up when they scroll into view. main.js adds
   .js to <html>, so without JavaScript everything stays visible. */
.js [data-reveal] {
  opacity: 0; transform: translateY(40px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Image hover zoom (project cards and similar). */
.zoom { overflow: hidden; }
.zoom img { transition: transform 1.2s var(--ease); }
.zoom:hover img, a:hover .zoom img { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
