/* THE EMADKO HOUSE, emadko.org
   Design notes:
   - One accent (warm sand) used sparingly: eyebrows, hairlines, focus rings.
     Restraint is what keeps a dark site reading as premium rather than as a
     template with a neon highlight.
   - Type pairing: Instrument Serif for display (the word "House" wants an
     atelier voice, not a SaaS one), Inter for everything that must stay legible
     at small sizes.
   - Every motion is behind prefers-reduced-motion. */

:root {
  --bg: #08090a;
  --bg-2: #0d0f11;
  --bg-3: #121417;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f1ed;
  --muted: rgba(243, 241, 237, 0.58);
  --muted-2: rgba(243, 241, 237, 0.40);
  --accent: #c8a97e;
  --accent-dim: rgba(200, 169, 126, 0.34);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --page: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(88px, 12vw, 168px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

::selection { background: var(--accent); color: #0a0a0a; }

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

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #0a0a0a;
  padding: 12px 18px; z-index: 200; font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* ── shared type ─────────────────────────────────────────────────── */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent-dim);
  flex: none;
}

h1, h2, h3 { font-weight: 400; margin: 0; }

h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 7.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.012em;
}

h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.008em;
}

em.accent {
  font-style: italic;
  color: var(--accent);
}

.lede {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.62;
  color: var(--muted);
  max-width: 58ch;
}

/* ── buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  transition: background .35s ease, border-color .35s ease, color .35s ease, transform .35s ease;
  white-space: nowrap;
}
.btn .arw { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.btn:hover .arw { transform: translateX(4px); }

.btn-primary {
  background: var(--text);
  color: #08090a;
  border-color: var(--text);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }

.btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── nav ─────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}
.mark {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: none;
}
.mark-glyph {
  width: 30px; height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--accent);
  flex: none;
}
.mark-text {
  font-size: 12.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 13.5px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav .btn { padding: 10px 20px; font-size: 13px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ── hero ────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: clamp(150px, 20vh, 210px);
  padding-bottom: var(--section-y);
  overflow: hidden;
}

/* Two slow, very low-opacity radial washes. They read as depth rather than as
   a gradient, which is the difference between "premium" and "2014 hero". */
.aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.aura-1 {
  width: 620px; height: 620px;
  top: -220px; left: -120px;
  background: radial-gradient(circle, rgba(200,169,126,.13), transparent 68%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.aura-2 {
  width: 540px; height: 540px;
  top: 40px; right: -180px;
  background: radial-gradient(circle, rgba(120,150,200,.10), transparent 68%);
  animation: drift2 27s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(70px, 50px, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(-60px, 70px, 0) scale(1.08); } }

.grid-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 3) 100%;
  max-width: var(--page);
  margin-inline: auto;
  opacity: .5;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 62%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 62%, transparent);
}

.hero-inner { position: relative; z-index: 1; }

.hero h1 { max-width: 15ch; margin-bottom: 30px; }
.hero .lede { margin-bottom: 40px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-meta {
  margin-top: clamp(64px, 9vw, 104px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.hero-meta div { min-width: 0; }
.hero-meta dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 7px;
}
.hero-meta dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--text);
}
@media (max-width: 720px) {
  .hero-meta { grid-template-columns: 1fr; gap: 22px; }
}

/* ── section shell ───────────────────────────────────────────────── */

section { position: relative; }

.band {
  padding-block: var(--section-y);
  border-top: 1px solid var(--line);
}

.band-head { max-width: 62ch; margin-bottom: clamp(48px, 6vw, 76px); }
.band-head h2 { margin-bottom: 22px; }

/* ── what we do ──────────────────────────────────────────────────── */

.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.col {
  background: var(--bg);
  padding: clamp(28px, 3.4vw, 42px);
  transition: background .45s ease;
}
.col:hover { background: var(--bg-2); }
.col-n {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 26px;
}
.col h3 { margin-bottom: 12px; }
.col p { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 880px) { .cols { grid-template-columns: 1fr; } }

/* ── lordkay feature ─────────────────────────────────────────────── */

.feature {
  border: 1px solid var(--line);
  background:
    radial-gradient(1000px 340px at 82% 0%, rgba(200,169,126,.07), transparent 62%),
    var(--bg-2);
  padding: clamp(30px, 4.4vw, 62px);
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(34px, 5vw, 70px);
  align-items: start;
}
@media (max-width: 940px) { .feature { grid-template-columns: 1fr; } }

.flag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 6px 13px;
  margin-bottom: 26px;
}
.flag .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.feature-name {
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.05;
  margin: 0 0 20px;
}
.feature p { color: var(--muted); margin: 0 0 30px; font-size: 15.5px; }

.svc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.svc-list li {
  border-bottom: 1px solid var(--line);
  padding: 15px 4px;
  font-size: 14.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: padding-left .35s ease, color .35s ease;
}
.svc-list li:hover { padding-left: 12px; color: var(--accent); }
.svc-list .idx {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--muted-2);
  flex: none;
  width: 22px;
}

/* ── portfolio in development ────────────────────────────────────── */

/* Four tiles, laid out 2x2 rather than 4-across. Four across at this page
   width gives each tile about 290px, which crowds the two-word categories and
   reads as a row that ran out of items. A 2x2 block of generous tiles reads as
   the chosen number. */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 620px) { .tiles { grid-template-columns: 1fr; } }

.tile {
  background: var(--bg);
  padding: clamp(24px, 2.8vw, 34px);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: background .45s ease;
}
.tile:hover { background: var(--bg-2); }
.tile::after {
  content: "";
  position: absolute;
  inset: auto auto -40% -20%;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(200,169,126,.10), transparent 70%);
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
.tile:hover::after { opacity: 1; }

.tile-mark {
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  position: relative;
}
/* A deliberate "withheld" glyph: three dots, not a blurred logo. Blurring a
   fake logo would be inventing a product; three dots say "not yet named". */
.tile-mark span {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .55;
  box-shadow: 7px 0 0 var(--accent), -7px 0 0 var(--accent);
}
.tile-cat {
  font-size: 14.5px;
  color: var(--text);
  margin: 0 0 6px;
  font-weight: 500;
}
.tile-status {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0;
}

.withheld-note {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.withheld-note::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--line-strong);
  flex: none;
}

/* ── principles ──────────────────────────────────────────────────── */

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(30px, 4vw, 56px);
}
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

.principle { border-top: 1px solid var(--line); padding-top: 24px; }
.principle h3 { margin-bottom: 10px; }
.principle p { margin: 0; color: var(--muted); font-size: 15px; }

/* ── contact ─────────────────────────────────────────────────────── */

.contact { text-align: center; }
.contact h2 { margin-bottom: 22px; }
.contact .lede { margin-inline: auto; margin-bottom: 42px; }

.mail-link {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(26px, 4.6vw, 46px);
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 8px;
  transition: color .35s ease, border-color .35s ease;
  word-break: break-word;
}
.mail-link:hover { color: var(--accent); border-color: var(--accent); }

.contact-alt {
  margin-top: 34px;
  font-size: 14px;
  color: var(--muted-2);
}
.contact-alt a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.contact-alt a:hover { color: var(--accent); }

/* ── footer ──────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  padding-block: 44px 52px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: center;
  justify-content: space-between;
}
.foot-legal {
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.7;
  max-width: 62ch;
}
.foot-legal strong { color: var(--muted); font-weight: 500; }
.foot-links { display: flex; gap: 26px; font-size: 13px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }

/* ── scroll reveal ───────────────────────────────────────────────── */

.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .aura-1, .aura-2, .flag .dot { animation: none; }
  .btn, .col, .tile, .svc-list li { transition: none; }
}
