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

body {
  -webkit-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

@media print {
  body { display: none !important; }
}

:root {
  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --black: #1a1a1a;
  --white: #ffffff;
  --highlight: #f5e642;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: transform 0.3s ease;
}

.header--hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-first {
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a:not(.nav-icon) {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--black);
  text-decoration: none;
  position: relative;
  transition: opacity 0.2s;
}

.nav a:not(.nav-icon)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1.5px;
  background: var(--black);
  transition: width 0.3s ease;
}

.nav a:not(.nav-icon):hover::after {
  width: 100%;
}

.nav a.nav-icon {
  color: var(--black);
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav a.nav-icon:hover {
  opacity: 0.6;
}

.nav-icon {
  display: flex;
  align-items: center;
}

/* Hero */
.hero {
  padding: 100px 0 120px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4.8vw, 3.8rem);
  font-weight: 400;
  line-height: 1.25;
  max-width: 100%;
  letter-spacing: -0.02em;
}

.hero h1 strong {
  font-weight: 700;
}

.highlight {
  position: relative;
  display: inline;
}

.highlight::after {
  content: '';
  position: absolute;
  left: -3%;
  bottom: -2px;
  width: 106%;
  height: 0.6em;
  z-index: -1;
  background: rgba(246, 239, 168, 0.47);
}

.hero-sub {
  margin-top: 40px;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 820px;
  color: #333;
}

.underline-link {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.underline-link:hover {
  opacity: 0.6;
}

/* Case Studies */
.work {
  padding: 40px 0 80px;
}

.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 100px;
}

.case-study:last-child {
  margin-bottom: 0;
}

.case-study-image {
  display: block;
  border-radius: 0;
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 1000 / 596;
  cursor: pointer;
}

.case-study-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.case-study-image:hover img {
  transform: scale(1.08) rotate(2deg);
}

.case-study-info h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.case-study-info p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
  max-width: 400px;
}

.btn-outline {
  display: inline-block;
  margin-top: 28px;
  padding: 16px 28px 12px;
  border: 1.5px solid var(--black);
  color: var(--black);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

/* Contact */
.contact {
  padding: 100px 0 120px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.contact p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
}

.contact-detail {
  display: block;
  margin-top: 8px;
  font-size: 1.05rem;
  color: var(--black);
}

.download-link {
  text-decoration: none;
  margin-top: 16px;
}

.download-link:hover {
  text-decoration: underline;
}

.contact-cta p {
  margin-bottom: 20px;
}

/* Footer */
.back-to-top {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  text-decoration: none;
  transition: opacity 0.2s;
  position: relative;
  top: -1px;
}

.back-to-top:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer {
  padding: 40px 0;
  border-top: 1px solid #e5e5e5;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  font-size: 0.85rem;
  color: #000;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 42px;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-icon {
  color: #000;
  transition: opacity 0.2s;
}

.footer-icon:hover {
  opacity: 0.6;
}

/* Menu Toggle — hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 200;
  padding: 0;
  align-items: center;
  justify-content: center;
  margin-right: -14px;
}

.menu-icon {
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-line {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.active .menu-icon {
  transform: rotate(90deg);
}

/* Lines 1 & 3 scale up and form one arm (local -45deg = screen 45deg after 90deg rotation) */
.menu-toggle.active .menu-line-1 {
  transform: matrix(1.011328, -1.011328, 0.707107, 0.707107, 11.4949, 27.0513) !important;
}

.menu-toggle.active .menu-line-3 {
  transform: matrix(1.011328, -1.011328, 0.707107, 0.707107, 11.4949, 27.0513) !important;
}

/* Line 2 flips to other arm (local 45deg = screen 135deg after 90deg rotation) */
.menu-toggle.active .menu-line-2 {
  transform: matrix(0.707107, 0.707107, -0.707107, 0.707107, 12.9487, 11.4949) !important;
}

.nav-locked {
  overflow: hidden;
}

/* ---- Tablet (1024px and below) ---- */
@media (max-width: 1024px) {
  .container {
    padding: 0 32px;
  }

  .hero {
    padding: 80px 0 100px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
  }

  .case-study {
    gap: 40px;
    margin-bottom: 80px;
  }

  .case-study-info h2 {
    font-size: 1.8rem;
  }

  .contact-grid {
    gap: 48px;
  }
}

/* ---- Tablet portrait / small tablet (768px and below) ---- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: 0;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                visibility 0.5s;
    z-index: 150;
  }

  .nav.nav-open {
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    padding: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  .nav.nav-open a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav.nav-open a:nth-child(1) { transition-delay: 0.1s; }
  .nav.nav-open a:nth-child(2) { transition-delay: 0.15s; }
  .nav.nav-open a:nth-child(3) { transition-delay: 0.2s; }
  .nav.nav-open a:nth-child(4) { transition-delay: 0.25s; }
  .nav.nav-open a:nth-child(5) { transition-delay: 0.3s; }

  .nav-icon svg {
    width: 28px;
    height: 28px;
  }

  .hero {
    padding: 60px 0 80px;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .case-study {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 64px;
  }

  .case-study-info h2 {
    font-size: 1.9rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact h2 {
    font-size: 1.8rem;
  }
}

/* ---- Mobile (480px and below) ---- */
@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .header-inner {
    height: 60px;
  }

  .menu-toggle {
    margin-right: -4px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 6.5vw, 2.2rem);
  }

  .hero-sub {
    margin-top: 28px;
    font-size: 0.95rem;
  }

  .case-study {
    margin-bottom: 48px;
    gap: 20px;
  }

  .case-study-info h2 {
    font-size: 1.6rem;
  }

  .case-study-info p {
    font-size: 1rem;
  }

  .btn-outline {
    padding: 12px 24px;
    font-size: 0.75rem;
  }

  .contact {
    padding: 64px 0 80px;
  }

  .contact h2 {
    font-size: 1.5rem;
  }

  .contact p,
  .contact-detail {
    font-size: 0.95rem;
  }

  .footer {
    padding: 40px 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
  }

  .footer-right {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .back-to-top {
    top: 0;
    order: -1;
    margin-bottom: 32px;
    font-size: 0.9rem;
  }

  .footer-icons {
    gap: 24px;
    margin-bottom: 28px;
  }

  .footer-icon svg {
    width: 24px;
    height: 24px;
  }

  .footer p {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.03em;
  }
}

/* Footer on phones/tablet portrait: same components as desktop (plain "Back to
   top" link, plain icons — no pills, no circles), only the arrangement changes
   from a horizontal row to a centered stack. This block comes after the older
   <=480 rules so it wins the cascade. */
@media (max-width: 600px) {
  .footer {
    padding: 40px 0;
    border-top: 1px solid #e5e5e5;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
  }

  /* Back to top + icons grouped first, copyright below — the same elements,
     just stacked. */
  .footer-right {
    order: -1;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  /* Reset every button/circle style so the components match desktop exactly. */
  .back-to-top {
    top: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    justify-content: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: #000;
  }

  .footer-icons {
    gap: 18px;
    margin: 0;
  }

  .footer-icon {
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    color: #000;
  }

  .footer-icon svg {
    width: 22px;
    height: 22px;
  }

  .footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
    letter-spacing: 0.02em;
  }
}
