/* ============================================================
   KHARL ED OLEGA — www.kharledolega.com
   Design: Cinematic. Minimal. Authoritative.
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:        #0A0A0A;
  --bg-2:      #111111;
  --bg-3:      #1A1A1A;
  --text:      #F5F2ED;
  --text-dim:  #888880;
  --accent:    #C9A84C;
  --accent-dk: #9A7A2E;
  --border:    rgba(245,242,237,0.10);
  --radius:    2px;

  --font-head: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --nav-h:     68px;
  --max-w:     1200px;
  --pad:       clamp(24px, 5vw, 80px);
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.8rem, 7vw, 6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.1rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-body); font-weight: 500; }

p { max-width: 68ch; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--text); line-height: 1.75; }
.label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section--dark { background: var(--bg); }
.section--mid  { background: var(--bg-2); }

/* ── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-head);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--text);
}
.nav__logo span { color: var(--accent); }
.nav__links {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  list-style: none;
}
.nav__links a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav__links a:hover,
.nav__links a.active { color: var(--text); }
.nav__links a.active { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: all 0.3s;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid currentColor;
  transition: all 0.25s;
  cursor: pointer;
}
.btn--light {
  color: var(--text);
  border-color: rgba(245,242,237,0.35);
}
.btn--light:hover {
  background: var(--text);
  color: var(--bg);
}
.btn--accent {
  color: var(--accent);
  border-color: var(--accent);
}
.btn--accent:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── RULE / DIVIDER ─────────────────────────────────────── */
.rule {
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin: 24px 0;
}
.rule--center { margin: 24px auto; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(60px, 8vh, 100px);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.72;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.1) 0%,
    rgba(10,10,10,0.05) 40%,
    rgba(10,10,10,0.7) 80%,
    rgba(10,10,10,1) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.hero__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-head);
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 28px;
}
.hero__title em {
  font-style: italic;
  color: var(--text-dim);
}
.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: rgba(245,242,237,0.65);
  max-width: 52ch;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero__cta { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }

/* ── PLACEHOLDER IMAGE ───────────────────────────────────── */
.img-placeholder {
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── PORTFOLIO GRID ──────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px;
}
.portfolio-item {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-3);
}
.portfolio-item img,
.portfolio-item .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.portfolio-item:hover img,
.portfolio-item:hover .img-placeholder { transform: scale(1.04); }
.portfolio-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.88) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.portfolio-item:hover .portfolio-item__overlay { opacity: 1; }
.portfolio-item__info { }
.portfolio-item__client {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.portfolio-item__title { font-family: var(--font-head); font-size: 1.2rem; }

/* Text-only portfolio item (no thumbnail available) */
.portfolio-item--text {
  background: linear-gradient(145deg, var(--bg-3) 0%, var(--bg-2) 100%);
}
.portfolio-item--text::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(245,242,237,0.015) 40px,
      rgba(245,242,237,0.015) 41px
    );
}
.portfolio-item__bg-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(245,242,237,0.12);
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}
.portfolio-item--text .portfolio-item__overlay {
  opacity: 0.7;
  background: linear-gradient(to top, rgba(10,10,10,0.75) 0%, transparent 70%);
}
.portfolio-item--text:hover .portfolio-item__overlay { opacity: 1; }

/* ── CATEGORY TABS ───────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-bar__btn {
  padding: 14px 28px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: var(--font-body);
}
.tab-bar__btn:hover { color: var(--text); }
.tab-bar__btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── CREDENTIALS TABLE ───────────────────────────────────── */
.cred-table { width: 100%; border-collapse: collapse; }
.cred-table tr { border-bottom: 1px solid var(--border); }
.cred-table tr:first-child { border-top: 1px solid var(--border); }
.cred-table td {
  padding: 16px 0;
  vertical-align: top;
  font-size: 0.9rem;
}
.cred-table td:first-child {
  width: 180px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-right: 24px;
}

/* ── CLIENT GRID ─────────────────────────────────────────── */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.client-cell {
  background: var(--bg);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.client-cell:hover { background: var(--bg-2); color: var(--text); }

/* ── SECTION HEADER ──────────────────────────────────────── */
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { margin-top: 12px; }

/* ── ABOUT SPLIT ──────────────────────────────────────────── */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.about-split__img {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  aspect-ratio: 4/5;
  overflow: hidden;
}
.about-split__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.about-split__body p + p { margin-top: 1.4em; }

/* ── STAT STRIP ───────────────────────────────────────────── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-right: none;
  margin: 60px 0;
}
.stat-strip__item {
  padding: 36px 28px;
  border-right: 1px solid var(--border);
}
.stat-strip__num {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-strip__label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
}
.contact-info { }
.contact-info__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 32px;
}
.contact-info__item .label { margin-bottom: 6px; }
.contact-info__item a:hover { color: var(--accent); }

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  display: block;
  margin-bottom: 16px;
  border-radius: var(--radius);
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-dim); }
.contact-form textarea { height: 140px; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer__inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__copy {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.footer__links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.footer__links a {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--accent); }

/* ── PAGE TRANSITION ─────────────────────────────────────── */
.page-fade {
  animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    top: var(--nav-h);
    background: var(--bg);
    padding: 40px var(--pad);
    gap: 32px;
    z-index: 99;
  }
  .nav__links.open a {
    font-size: 1.2rem;
    letter-spacing: 0.08em;
  }
  .nav__toggle { display: flex; }

  .about-split { grid-template-columns: 1fr; }
  .about-split__img { position: static; aspect-ratio: 16/9; }

  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }

  .portfolio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .hero__cta { flex-direction: column; align-items: flex-start; }
}

/* ── SCROLL REVEAL ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
