/* ================================================
   SOLARGHOST — PERSONAL HOME
   Taste-skill: asymmetric, warm amber, premium
   ================================================ */

/* 1 · TOKENS */
:root {
  --bg:          #f2ece2;
  --bg-deep:     #e8dfd1;
  --text:        #1c1712;
  --muted:       #6b6059;
  --accent:      #d78f3f;
  --accent-dk:   #9c6325;
  --accent-lt:   rgba(215,143,63,0.10);
  --accent-ring: rgba(215,143,63,0.18);
  --surface:     rgba(255,250,244,0.76);
  --surface-hv:  rgba(255,250,244,0.96);
  --line:        rgba(34,29,24,0.08);
  --line-hv:     rgba(34,29,24,0.18);
  --shadow:      0 20px 56px rgba(47,35,21,0.10);
  --shadow-hv:   0 32px 80px rgba(47,35,21,0.17);

  --f-display: "Outfit", system-ui, sans-serif;
  --f-body:    "DM Sans", system-ui, sans-serif;

  --max:     1320px;
  --pad:     2rem;
  --ease:    cubic-bezier(0.16,1,0.3,1);

  --r-sm: 0.625rem;
  --r-md: 1.125rem;
  --r-lg: 1.625rem;
  --r-xl: 2rem;
}

/* 2 · RESET */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
ul[role="list"] { list-style: none; }

/* 3 · BODY */
body {
  font-family: var(--f-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 5% 8%,  rgba(215,143,63,0.14) 0%, transparent 42%),
    radial-gradient(ellipse at 92% 12%, rgba(156,99,37,0.08)  0%, transparent 38%),
    radial-gradient(ellipse at 50% 90%, rgba(215,143,63,0.06) 0%, transparent 50%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Grain — fixed, pointer-events-none, GPU safe */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* 4 · ANIMATIONS */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(22px); }
  to   { opacity:1; transform:translateY(0); }
}

.animate-up {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity  0.72s var(--ease),
    transform 0.72s var(--ease);
  transition-delay: var(--delay, 0s);
}
.animate-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 5 · TYPOGRAPHY */
h1,h2,h3 {
  font-family: var(--f-display);
  letter-spacing: -0.05em;
  line-height: 0.94;
}
h1 { font-size: clamp(3.2rem, 7.5vw, 6.4rem); font-weight: 800; }
h2 { font-size: clamp(2rem,   4vw,   3.4rem);  font-weight: 800; }
h3 { font-size: clamp(1.35rem,2.4vw, 1.9rem);  font-weight: 700; }

.label {
  display: inline-block;
  font-family: var(--f-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dk);
  margin-bottom: 0.85rem;
}

/* 6 · NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242,236,226,0.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
.nav.is-scrolled {
  box-shadow: 0 2px 24px rgba(47,35,21,0.07);
}

.nav__inner {
  width: min(calc(100% - var(--pad)*2), var(--max));
  margin-inline: auto;
  height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.nav__logo {
  width: 42px;
  height: 42px;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--line-hv);
  box-shadow: 0 4px 14px rgba(47,35,21,0.12);
  flex-shrink: 0;
  transition: box-shadow 0.2s ease, transform 0.2s var(--ease);
}
.nav__brand:hover .nav__logo {
  box-shadow: 0 6px 18px rgba(47,35,21,0.18);
  transform: scale(1.04);
}
.nav__logo img { width:100%; height:100%; object-fit:cover; }

.nav__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.975rem;
  letter-spacing: -0.03em;
}

.nav__links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
}
.nav__links a {
  padding: 0.45rem 0.85rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.18s ease, background 0.18s ease;
}
.nav__links a:hover {
  color: var(--text);
  background: rgba(34,29,24,0.06);
}

/* 7 · HERO */
.hero {
  width: min(calc(100% - var(--pad)*2), var(--max));
  margin-inline: auto;
  padding: 6rem 0 5rem;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3rem;
  align-items: center;
}

.hero__copy h1 { margin-bottom: 1.5rem; max-width: 11ch; }

.hero__lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 40ch;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.hero__actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.hero__note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.45rem;
  border-radius: var(--r-md);
  font-family: var(--f-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.18s ease;
}
.btn:active { transform: scale(0.97) translateY(1px) !important; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 18px rgba(215,143,63,0.28);
}
.btn--primary:hover {
  background: var(--accent-dk);
  box-shadow: 0 8px 28px rgba(215,143,63,0.36);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-hv);
}
.btn--ghost:hover {
  background: rgba(34,29,24,0.05);
  border-color: rgba(34,29,24,0.24);
  transform: translateY(-2px);
}

/* Hero mark */
.hero__mark {
  justify-self: end;
  width: 100%;
  max-width: 370px;
  aspect-ratio: 1;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid rgba(156,99,37,0.22);
  box-shadow: var(--shadow), 0 0 0 10px var(--accent-ring);
  transform: translateY(1.25rem) rotate(2.5deg);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.hero__mark:hover {
  transform: translateY(0) rotate(0deg);
  box-shadow: var(--shadow-hv), 0 0 0 14px var(--accent-ring);
}
.hero__mark img { width:100%; height:100%; object-fit:cover; }

/* 8 · SECTION SHELL */
.section {
  width: min(calc(100% - var(--pad)*2), var(--max));
  margin-inline: auto;
  padding: 5rem 0;
  border-top: 1px solid var(--line);
}

.section__header { margin-bottom: 3rem; }
.section__header h2 { margin-bottom: 0.8rem; }
.section__sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 44ch;
  line-height: 1.65;
}

/* 9 · PROJECTS GRID */
.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 640px;
  gap: 1rem;
}

/* Cards */
.project-card {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /* Liquid-glass inner border */
  box-shadow: var(--shadow),
              inset 0 1px 0 rgba(255,255,255,0.55),
              inset 0 0 0 1px rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  overflow: hidden;
  transition:
    transform   0.4s var(--ease),
    box-shadow  0.4s var(--ease),
    border-color 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Subtle top-left sheen */
.project-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 65%;
  height: 55%;
  background: linear-gradient(135deg, rgba(255,250,244,0.45) 0%, transparent 70%);
  border-radius: inherit;
  pointer-events: none;
}

.project-card:hover {
  box-shadow: var(--shadow-hv),
              inset 0 1px 0 rgba(255,255,255,0.6),
              inset 0 0 0 1px rgba(255,255,255,0.15);
  border-color: var(--line-hv);
}

/* Feature card — spans both rows */
.project-card--feature {
  padding: 2.5rem;
}

.project-card__top { display: flex; align-items: flex-start; justify-content: space-between; }

.project-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--accent-lt);
  border: 1px solid rgba(215,143,63,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dk);
}

.project-card__body { flex: 1; }
.project-card__body h3 { margin-bottom: 0.65rem; line-height: 1; }
.project-card__body p {
  margin-top: 0.7rem;
  font-size: 0.975rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 36ch;
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-card__tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: rgba(255,250,244,0.7);
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-family: var(--f-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-dk);
  transition: gap 0.2s var(--ease), color 0.18s ease;
}
.project-card__link:hover {
  color: var(--accent);
  gap: 0.6rem;
}

/* 10 · REVIEWS */
.reviews__empty {
  padding: 4.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
  border: 1px dashed rgba(34,29,24,0.15);
  border-radius: var(--r-xl);
  background: rgba(255,250,244,0.38);
}

.reviews__empty-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--r-md);
  background: var(--accent-lt);
  border: 1px solid rgba(215,143,63,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dk);
  margin-bottom: 0.5rem;
}

.reviews__empty-headline {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.reviews__empty-hint {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.reviews__categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.reviews__cat {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-dk);
  background: var(--accent-lt);
  border: 1px solid rgba(215,143,63,0.18);
}

/* 11 · ELSEWHERE */
.elsewhere .elsewhere__grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.elsewhere__col h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.elsewhere__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}

.elsewhere-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.9rem;
  transition:
    background  0.2s ease,
    border-color 0.2s ease,
    transform   0.22s var(--ease),
    box-shadow  0.22s var(--ease);
}
.elsewhere-link:hover {
  background: var(--surface-hv);
  border-color: var(--line-hv);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47,35,21,0.09);
}
.elsewhere-link svg { color: var(--muted); transition: color 0.18s ease; }
.elsewhere-link:hover svg { color: var(--accent-dk); }

/* 12 · FOOTER */
.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 2.25rem 0;
}

.footer__inner {
  width: min(calc(100% - var(--pad)*2), var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  opacity: 0.75;
  transition: opacity 0.18s ease;
}
.footer__brand:hover { opacity: 1; }

.footer__logo {
  width: 30px;
  height: 30px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--line-hv);
}
.footer__logo img { width:100%; height:100%; object-fit:cover; }

.footer__brand span {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}

.footer__tagline {
  font-size: 0.82rem;
  color: var(--muted);
}

/* 13 · RESPONSIVE */
@media (max-width: 1024px) {
  .hero { padding: 4.5rem 0 3.5rem; gap: 2.5rem; }
  .elsewhere .elsewhere__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .elsewhere__links { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --pad: 1.25rem; }

  .hero {
    grid-template-columns: 1fr;
    padding: 3.5rem 0 3rem;
    gap: 2rem;
    text-align: center;
  }
  .hero__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero__copy h1,
  .hero__lede,
  .hero__note {
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__mark {
    justify-self: center;
    max-width: 200px;
    width: min(58vw, 200px);
    transform: none;
    margin: 0 auto;
  }
  .hero__mark:hover { transform: none; }

  .projects__grid {
    grid-template-columns: 1fr;
  }
  .project-card--feature {
    grid-row: span 1;
    min-height: auto;
  }

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

@media (max-width: 540px) {
  .hero__actions { flex-direction: column; align-items: center; }
  .project-card, .project-card--feature { padding: 1.5rem; }
  .reviews__empty { padding: 3rem 1.25rem; }
  .nav__inner { height: 4rem; }
}

/* ── HFC PROJECT CARD ───────────────────────────── */

.project-card--hfc {
  padding: 0;
  overflow: hidden;
  gap: 0;
}

/* Preview pane — mini window into the HFC site */
.hfc-preview {
  position: relative;
  background: #1B1B1D;
  background-image: url('./hfc-hero.webp');
  background-size: cover;
  background-position: center 20%;
  overflow: hidden;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

/* Dark gradient overlay so text reads clearly */
.hfc-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(27,27,29,0.72) 0%, rgba(27,27,29,0.55) 45%, rgba(27,27,29,0.85) 100%);
  z-index: 1;
}

/* HFC navbar strip */
.hfc-preview__nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid rgba(200,164,81,0.20);
  background: rgba(27,27,29,0.50);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  gap: 0.75rem;
}

.hfc-preview__brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: #C8A451;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hfc-preview__icon {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.hfc-preview__nav-links {
  display: flex;
  gap: 0.85rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.58rem;
  font-weight: 500;
  color: rgba(237,234,224,0.60);
  letter-spacing: 0.02em;
}

/* Hero section of preview */
.hfc-preview__hero {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.hfc-preview__headline {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 700;
  color: #EDEAE0;
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.hfc-preview__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  background: #B04343;
  color: #EDEAE0;
  font-family: 'Roboto', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  border-radius: 0.3rem;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(176,67,67,0.35);
}

/* Card body below the preview */
.project-card--hfc .project-card__body,
.project-card--hfc .project-card__footer {
  padding-left: 2rem;
  padding-right: 2rem;
}

.project-card--hfc .project-card__body {
  padding-top: 1.5rem;
}

.project-card--hfc .project-card__footer {
  padding-bottom: 2rem;
}

/* HFC preview hero — split layout with logo on right */
.hfc-preview__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hfc-preview__hero-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hfc-preview__logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.92;
  filter: drop-shadow(0 4px 16px rgba(200,164,81,0.25));
}
