/* SGK Designs — Fraunces + Onest, warm studio palette + fixed grain */

:root {
  --ink: #1c1612;
  --ink-soft: #3d342c;
  --cream: #f6f0e8;
  --cream-deep: #ebe3d7;
  --paper: #fffdf8;
  --terracotta: #b85c38;
  --terracotta-dk: #8c4228;
  --terracotta-lt: #d47852;
  --sage: #5a6b5a;
  --line: rgba(28, 22, 18, 0.1);
  --line-strong: rgba(28, 22, 18, 0.16);
  --shadow: 0 24px 48px rgba(28, 22, 18, 0.08);
  --shadow-soft: 0 12px 32px rgba(28, 22, 18, 0.06);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Onest", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 14px;
  --radius-lg: 22px;
}

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

html {
  scroll-behavior: smooth;
}

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

  .marquee-track {
    animation: none !important;
  }

  .project-link {
    transform: none !important;
  }
}

body {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

/* Textured overlay — same fractal noise as concept; sits behind UI */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10001;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

a {
  color: inherit;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(246, 240, 232, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--terracotta);
  box-shadow: var(--shadow-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--terracotta-dk);
  border-bottom-color: var(--terracotta-lt);
}

.site-nav .nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}

.site-nav .nav-cta:hover {
  background: var(--cream-deep);
  border-color: var(--terracotta-lt);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(246, 240, 232, 0.98);
    border-bottom: 1px solid var(--line);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s var(--ease), opacity 0.25s;
  }

  .site-nav.is-open {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav .nav-cta {
    margin-top: 0.5rem;
    text-align: center;
  }
}

/* ——— Hero ——— */
.hero {
  padding: 2.5rem 1.25rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: center;
}

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

.hero-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-dk);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-title-line {
  display: block;
}

.hero-title-line--accent {
  color: var(--terracotta);
  font-style: italic;
  font-weight: 600;
}

.hero-tag {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 36ch;
  margin-bottom: 1rem;
}

.hero-lede {
  color: var(--ink-soft);
  max-width: 42ch;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--paper);
  border-color: var(--terracotta);
}

.btn-primary:hover {
  background: var(--terracotta-dk);
  border-color: var(--terracotta-dk);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-outline:hover {
  border-color: var(--terracotta);
  color: var(--terracotta-dk);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-frame {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
}

.hero-poster {
  position: absolute;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
}

.hero-poster--a {
  inset: 8% 12% 18% 0;
  transform: rotate(-4deg);
  z-index: 1;
  background-image: url("images/sgk-portfolio-cover.png");
}

.hero-poster--b {
  inset: 0 0 12% 18%;
  transform: rotate(6deg);
  z-index: 2;
  background-image: url("images/smoking-kills-cover.jpg");
}

.hero-badge {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

/* ——— Marquee ——— */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.marquee-dot {
  opacity: 0.35;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ——— Sections ——— */
.section {
  padding: 3.5rem 1.25rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 52ch;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-dk);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ——— Work toolbar + grid ——— */
.work-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1.75rem;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.work-toolbar-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work-filter {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--cream);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.work-filter:hover {
  border-color: var(--terracotta-lt);
  color: var(--ink);
}

.work-filter.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.work-count {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--sage);
}

@media (max-width: 640px) {
  .work-count {
    width: 100%;
    margin-left: 0;
  }
}

.project-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.project-card {
  --stagger: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease) calc(var(--stagger) * 0.05s),
    transform 0.55s var(--ease) calc(var(--stagger) * 0.05s);
}

.project-card.is-inview {
  opacity: 1;
  transform: translateY(0);
}

.project-card.is-filtered-out {
  display: none;
}

.project-card--feature {
  grid-column: span 2;
  grid-row: span 1;
}

@media (max-width: 1024px) {
  .project-card--feature {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .project-card--feature {
    grid-column: span 1;
  }
}

.project-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  height: 100%;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: box-shadow 0.3s var(--ease), border-color 0.25s, transform 0.12s ease-out;
}

.project-link:hover,
.project-link:focus-visible {
  box-shadow: var(--shadow);
  border-color: rgba(184, 92, 56, 0.35);
}

.project-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream-deep);
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.project-link:hover .project-visual img,
.project-link:focus-visible .project-visual img {
  transform: scale(1.04);
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  background: linear-gradient(to top, rgba(28, 22, 18, 0.65), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.project-link:hover .project-overlay,
.project-link:focus-visible .project-overlay {
  opacity: 1;
}

.project-overlay-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8rem;
}

.project-overlay--more {
  opacity: 1;
  background: linear-gradient(135deg, rgba(184, 92, 56, 0.85), rgba(28, 22, 18, 0.5));
}

.project-visual--more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--terracotta-lt), var(--terracotta-dk));
  aspect-ratio: 4 / 3;
}

.more-cta {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--paper);
  text-align: center;
  padding: 1rem;
}

.project-body {
  padding: 1rem 1.15rem 1.2rem;
}

.project-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta-dk);
  margin-bottom: 0.35rem;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.project-card--feature .project-title {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
}

.project-tag {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Shine sweep on hover */
.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.65s var(--ease);
  pointer-events: none;
}

.project-link:hover .project-visual::after,
.project-link:focus-visible .project-visual::after {
  transform: translateX(100%);
}

/* ——— Reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .project-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ——— About ——— */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .about-inner {
    grid-template-columns: 1fr;
  }
}

.about-quote {
  padding: 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.about-brand {
  margin-bottom: 1rem;
}

.about-logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--terracotta);
  object-fit: cover;
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--terracotta);
  opacity: 0.5;
  margin-bottom: 0.25rem;
}

.quote-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.quote-emoji {
  font-style: normal;
}

.quote-src {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.about-panel {
  padding: 2rem;
  background: linear-gradient(160deg, var(--cream-deep), var(--cream));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.about-heading {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.about-text {
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.about-facts {
  list-style: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.about-facts li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.about-facts li:first-child {
  border-top: none;
  padding-top: 0;
}

.fact-label {
  display: inline-block;
  min-width: 4.5rem;
  font-weight: 700;
  color: var(--ink);
}

/* ——— Contact ——— */
.contact {
  position: relative;
  max-width: none;
  padding-inline: 0;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 45%, #e8dfd2 100%);
  z-index: 0;
}

.contact-wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4rem;
}

.contact-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-dk);
  margin-bottom: 0.75rem;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.contact-lede {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  text-align: left;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.btn-cozy-primary {
  background: var(--terracotta);
  color: var(--paper);
  border-color: var(--terracotta);
}

.btn-cozy-primary:hover {
  background: var(--terracotta-dk);
}

.btn-cozy-secondary {
  background: var(--cream-deep);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-cozy-secondary:hover {
  border-color: var(--terracotta);
  color: var(--terracotta-dk);
}

.contact-note {
  font-size: 0.88rem;
  color: var(--sage);
  text-align: left;
}

/* ——— Footer ——— */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--ink);
  color: rgba(246, 240, 232, 0.88);
  padding: 0 0 2rem;
}

.footer-topper {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-topper-line {
  flex: 1;
  height: 1px;
  background: rgba(246, 240, 232, 0.15);
}

.footer-topper-mark {
  color: var(--terracotta-lt);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(246, 240, 232, 0.12);
}

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

.footer-lockup {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.footer-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--terracotta-lt);
  object-fit: cover;
  flex-shrink: 0;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--paper);
}

.footer-tagline {
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(246, 240, 232, 0.72);
}

.footer-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-lt);
  margin-bottom: 0.65rem;
}

.footer-signoff {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(246, 240, 232, 0.75);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(246, 240, 232, 0.55);
}

.footer-copy-name {
  color: rgba(246, 240, 232, 0.75);
}

.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-domain {
  color: var(--terracotta-lt);
  text-decoration: none;
  font-weight: 600;
}

.footer-domain:hover {
  text-decoration: underline;
}

.footer-top-link {
  color: rgba(246, 240, 232, 0.65);
  text-decoration: none;
}

.footer-top-link:hover {
  color: var(--paper);
}
