/* ─────────────────────────────────────────────
   ekenel.com — Global Stylesheet
   Aesthetic: Editorial minimal · Typographic
   ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --ink:       #111111;
  --ink-mid:   #555555;
  --ink-light: #999999;
  --rule:      #e0e0e0;
  --bg:        #fafaf8;
  --bg-warm:   #f3f2ee;
  --accent:    #c8502a;
  --accent-lt: #f2ede9;
  --white:     #ffffff;

  --serif:  'DM Serif Display', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;

  --max:    1100px;
  --gap:    clamp(2rem, 5vw, 4rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.18s var(--ease);
  border-radius: 4px;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

.nav-links a.active {
  background: var(--bg-warm);
}

/* hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.25s var(--ease);
}

/* ── Page Shell ── */
.page-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--gap) var(--gutter) calc(var(--gap) * 2);
}

/* ── Hero (interior pages) ── */
.page-hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.page-hero .eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.page-hero .lede {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ink-mid);
  max-width: 55ch;
  font-weight: 300;
  line-height: 1.65;
}

/* ── Sections ── */
.section {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

/* ── Typography ── */
h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 0.5rem;
}

p {
  color: var(--ink-mid);
  margin-bottom: 1.25rem;
  max-width: 65ch;
}

p:last-child { margin-bottom: 0; }

/* ── Two-col layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── Info grid (label/value pairs) ── */
.info-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.info-grid dt,
.info-grid dd {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.info-grid dt {
  font-weight: 500;
  color: var(--ink);
  padding-right: 2rem;
  min-width: 160px;
}

.info-grid dd {
  color: var(--ink-mid);
}

/* ── Placeholder card ── */
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.placeholder-card {
  border: 1.5px dashed var(--rule);
  border-radius: 6px;
  padding: 1.5rem 1rem;
  text-align: center;
  background: var(--bg-warm);
}

.placeholder-card .ph-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  opacity: 0.35;
}

.placeholder-card .ph-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-mid);
  font-family: 'Courier New', monospace;
  word-break: break-all;
  margin-bottom: 0.35rem;
}

.placeholder-card .ph-note {
  font-size: 0.7rem;
  color: var(--ink-light);
}

/* ── PDF download button ── */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
  margin-top: 0.5rem;
  margin-right: 0.5rem;
}

.btn-download:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-download svg { flex-shrink: 0; }

/* ── Tag chips ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  background: var(--bg-warm);
  border-radius: 2px;
  color: var(--ink-mid);
}

/* ── Portfolio card grid ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
  margin-top: 1.5rem;
}

.portfolio-card {
  background: var(--white);
  padding: 2rem;
  border: 1px solid var(--rule);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.portfolio-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.portfolio-card .card-num {
  font-size: 0.7rem;
  color: var(--ink-light);
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.portfolio-card .card-cat {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.portfolio-card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.75rem;
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 400;
}

.portfolio-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-mid);
  flex: 1;
  max-width: none;
  margin-bottom: 1.5rem;
}

.portfolio-card .card-arrow {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-light);
  letter-spacing: 0.06em;
  transition: color 0.18s, gap 0.18s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.portfolio-card:hover .card-arrow { color: var(--ink); gap: 0.65rem; }

/* ── Embed wrapper ── */
.embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-warm);
  margin: 1.5rem 0;
}

.embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ── Project phases ── */
.phases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.phase {
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--rule);
  text-align: center;
}

.phase:last-child { border-right: none; }

.phase-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--rule);
  display: block;
  margin-bottom: 0.25rem;
}

.phase-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: clamp(2rem, 4vw, 3rem) var(--gutter);
  background: var(--bg);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--ink-light);
}

.footer-contact {
  text-align: right;
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.8;
}

.footer-contact a { transition: color 0.15s; }
.footer-contact a:hover { color: var(--accent); }

.footer-copy {
  margin-top: 2rem;
  font-size: 0.7rem;
  color: var(--ink-light);
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.55s var(--ease) both;
}

.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.13s; }
.fade-up:nth-child(3) { animation-delay: 0.21s; }
.fade-up:nth-child(4) { animation-delay: 0.29s; }
.fade-up:nth-child(5) { animation-delay: 0.37s; }
.fade-up:nth-child(6) { animation-delay: 0.45s; }
.fade-up:nth-child(7) { animation-delay: 0.53s; }
.fade-up:nth-child(8) { animation-delay: 0.61s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 1rem var(--gutter);
    gap: 0.25rem;
  }
  .nav-toggle { display: flex; }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .phases { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-contact { text-align: left; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid dt { border-bottom: none; padding-bottom: 0; color: var(--ink-light); font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .phases { grid-template-columns: 1fr; }
}
