/* =========================================================
   Unknown Studios — brand site
   Palette: Saffron #D97000 · Dune #FCD9B6 · Olive #626923 · Limestone #707062
   Type: Lyon Display (headlines) · ABC Diatype (body) · Segoe UI fallback
   ========================================================= */

/* ---- Brand webfonts (self-hosted, licensed) --------------------------------
   Lyon Display Light (headlines, Latin + Arabic) · ABC Diatype (body). */
@font-face {
  font-family: "Lyon Display";
  src: url("/assets/fonts/LyonDisplay-Light-Web.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lyon Display";
  src: url("/assets/fonts/LyonArabicDisplay-Light-Web.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "ABC Diatype";
  src: url("/assets/fonts/ABCDiatype-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABC Diatype";
  src: url("/assets/fonts/ABCDiatype-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --olive: #626923;
  --orange: #D97000;

  --bg: #ffffff;           /* White */
  --ink: #000000;          /* Black — headings / body (approved text on White) */
  --muted: #707062;        /* Limestone — secondary text */
  --line: #e7e5dd;         /* hairline (neutral tint) */

  --maxw: 1240px;
  --gutter: clamp(1.5rem, 5vw, 5.5rem);

  --font-serif: "Lyon Display", "Segoe UI", Georgia, "Times New Roman", serif;
  --font-sans: "ABC Diatype", "Segoe UI", system-ui, -apple-system, Roboto,
    Helvetica, Arial, sans-serif;

  --text: 1rem; /* single size for all normal body/content text */

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 2rem) var(--gutter);
}
.brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.brand-tag {
  max-width: 30ch;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--muted);
}
.brand-tag .nowrap { white-space: nowrap; }

.site-nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--ink);
  opacity: 0.7;
  transition: opacity 0.25s var(--ease);
}
.site-nav a:hover,
.site-nav a:focus-visible { opacity: 1; }

/* single official vertical logo (knot mark + bilingual wordmark) */
.brand { display: inline-flex; }
.brand-logo { height: 42px; width: auto; max-width: none; flex: 0 0 auto; }
.brand-logo--v { display: none; } /* horizontal lockup on desktop, vertical on mobile */

/* hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.5rem -0.5rem -0.5rem 0; /* enlarge tap target without shifting layout */
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1.3rem;
  height: 2px;
  background: var(--orange);
  transform: translateX(-50%);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle-bars { top: 50%; margin-top: -1px; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
/* animate to an X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(5rem, 10vh, 8rem) var(--gutter) clamp(1.75rem, 4vh, 3rem);
}
.hero-content {
  flex: 1; /* fills the space so the headline centres and the CTAs sit near the bottom */
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.hero-headline {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.85rem, 4.1vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: none;
}
/* explicit line breaks give a clean 3-line title on desktop; on narrow
   screens they're disabled so the title wraps naturally at a smaller size */
@media (max-width: 860px) {
  .hero-headline .hb { display: none; }
}
.accent { color: var(--orange); }
.hero-sub {
  margin: clamp(1.25rem, 2.5vh, 2rem) 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  line-height: 1.35;
  color: var(--muted);
  max-width: none; /* one line on desktop; wraps only on narrow screens */
}
/* CTAs hug the bottom of the hero (hero-grid flexes to fill above them) */
.cta-row {
  width: 100%;
  max-width: var(--maxw);
  margin: clamp(1.5rem, 3vh, 2.5rem) auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  justify-content: center;
}

/* =========================================================
   Buttons
   ========================================================= */
.button {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.button.primary {
  background: var(--orange);
  color: #fff;
}
.button.primary:hover,
.button.primary:focus-visible {
  transform: translateY(-2px);
  background: #b85c00;
}
.button.ghost {
  border-color: rgba(27, 26, 21, 0.28);
  color: var(--ink);
}
.button.ghost:hover,
.button.ghost:focus-visible {
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* =========================================================
   Sections
   ========================================================= */
section { padding-inline: var(--gutter); }

/* Careers — full page, content vertically centered */
.careers {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(4rem, 10vh, 7rem);
  border-top: 1px solid var(--line);
}

/* What we do — full page: pillars centered, note pinned to the bottom */
.work {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(6rem, 12vh, 9rem) var(--gutter) clamp(3rem, 6vh, 5rem);
  border-top: 1px solid var(--line);
}
.work-heading {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.01em;
}

.work-lead {
  width: 100%;
  max-width: var(--maxw);
  margin: 0.7rem auto 0;
  color: var(--muted);
  font-size: var(--text);
}
.work-pillars-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}
.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 2.4vw, 2.4rem);
}
/* five-practice-area variant (v3) */
.pillars--five { grid-template-columns: repeat(5, 1fr); gap: clamp(1.25rem, 2vw, 2rem); }
.pillars--five .pillar h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); }

.pillar-icon {
  display: block;
  color: var(--orange);
  margin-bottom: 1.5rem;
}
.pillar-icon svg {
  width: clamp(40px, 4vw, 54px);
  height: auto;
}
.pillar h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 0 0 0.8rem;
}
.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text);
  line-height: 1.5;
  max-width: 34ch;
}
.work-note {
  max-width: none;
  margin: clamp(3rem, 7vh, 6rem) 0 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4.6vw, 3.4rem);
  line-height: 1.18;
}

/* Careers */
.careers {
  max-width: var(--maxw);
  margin-inline: auto;
}
.careers-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.careers-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem); /* match .work-heading */
  letter-spacing: -0.01em;
  margin: 0;
}
.careers-body {
  margin: 0;
  color: var(--muted);
  font-size: var(--text);
  max-width: 46ch;
}
.positions {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  border-top: 1px solid var(--line);
}
.position {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.position-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  flex: 1 1 auto;
}
.position-meta {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}
.position-apply {
  flex: 0 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.2s var(--ease);
}
.position-apply:hover { color: var(--orange); }
.careers-open {
  font-size: var(--text);
  color: var(--muted);
  margin: 0;
}
.careers-open a {
  color: var(--ink);
  border-bottom: 1px solid var(--orange);
  padding-bottom: 1px;
}
.careers-open a:hover { color: var(--orange); }


/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(1.5rem, 3.5vw, 2.5rem) var(--gutter);
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: inline-flex; }
.footer-logo { height: 36px; width: auto; max-width: none; flex: 0 0 auto; }
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-meta a { color: inherit; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.footer-meta a:hover { color: var(--orange); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1040px) {
  .pillars { grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 5vw, 3rem); }
}
@media (max-width: 860px) {
  .careers-head { grid-template-columns: 1fr; }
  .hero-headline { max-width: none; line-height: 1.4; }
  .hero-sub { line-height: 1.5; margin-top: 1.6rem; }
}
@media (max-width: 560px) {
  .pillars { grid-template-columns: 1fr; gap: 0; }
  .pillar { padding-block: 1.4rem; }
  .pillar-icon { margin-bottom: 0.7rem; } /* icons closer to the text on mobile */
}

@media (max-width: 560px) {
  /* vertically centre the hamburger against the logo's midline */
  .site-header { align-items: center; }
  /* landscape lockup on mobile too (slightly larger) */
  .brand-logo--h { display: block; height: 32px; }
  .brand-logo--v { display: none; }
  .footer-logo { height: 30px; }
  .footer-meta { text-align: left; }

  /* show the hamburger */
  .nav-toggle { display: inline-flex; }

  /* nav becomes a dropdown panel anchored under the header */
  .site-nav {
    position: absolute;
    top: calc(100% - 0.5rem);
    right: var(--gutter);
    flex-direction: column;
    align-items: flex-end;
    gap: 1.1rem;
    padding: 1.25rem 1.4rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 2px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    /* hidden by default; revealed when open */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  /* tighten v3's five practice-area cards so the section scrolls less */
  .pillars--five .pillar { padding-block: 0.9rem; }
  .pillars--five .pillar-icon { margin-bottom: 0.5rem; }
  .pillars--five .pillar h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
