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

:root {
  --bg:       #FAFAF8;
  --bg-alt:   #F3F1ED;
  --text:     #1C1C1E;
  --accent:   #8B7355;
  --muted:    #6B6B6B;
  --border:   #E2DEDA;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: 5rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #7a6449; }
* { scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg); }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================================
   Rolling Die
   ========================================= */
#die-wrap {
  position: fixed;
  left: -55px;
  top: -55px;
  perspective: 900px;
  pointer-events: none;
  z-index: 110;
  will-change: transform;
  filter:
    drop-shadow(0 28px 52px rgba(8, 24, 110, 0.60))
    drop-shadow(0 0 28px rgba(60, 110, 255, 0.28));
}

#die {
  width: 210px;
  height: 210px;
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: auto;
  cursor: grab;
}

#die:active {
  cursor: grabbing;
}

.face {
  position: absolute;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(80, 120, 255, 0.28);
}

/* Blue-glass refraction — 30% opacity tint, zero white */
.face::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(90, 130, 255, 0.30) 0%,
    rgba(60, 100, 220, 0.12) 42%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 1;
}

/* No specular — glass look lives in the gradient only */
.face::after {
  display: none;
}

/* Navy blue depth — shadows only in blue/dark tones, no white */
.face.front {
  background: #1a3590;
  box-shadow: inset 0 0 30px rgba(0,0,60,0.22);
}
.face.back {
  background: #1a3590;
  box-shadow: inset 0 0 44px rgba(0,0,0,0.48);
}
.face.right {
  background: #1a3590;
  box-shadow: inset -12px 0 38px rgba(0,0,0,0.42);
}
.face.left {
  background: #1a3590;
  box-shadow: inset 12px 0 38px rgba(0,0,0,0.34);
}
.face.top {
  background: #1a3590;
  box-shadow: inset 0 8px 28px rgba(40,80,200,0.20);
}
.face.bottom {
  background: #1a3590;
  box-shadow: inset 0 -8px 26px rgba(0,0,0,0.55);
}

.face.front  { transform: rotateY(0deg)    translateZ(105px); }
.face.back   { transform: rotateY(180deg)  translateZ(105px); }
.face.right  { transform: rotateY(90deg)   translateZ(105px); }
.face.left   { transform: rotateY(-90deg)  translateZ(105px); }
.face.top    { transform: rotateX(90deg)   translateZ(105px); }
.face.bottom { transform: rotateX(-90deg)  translateZ(105px); }

.face-text {
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.40), 0 3px 14px rgba(0,0,0,0.45);
  user-select: none;
  position: relative;
  z-index: 4;
}

/* Minimalist graffiti — 4 small dots at each corner */
.face-corners {
  position: absolute;
  inset: 13px;
  pointer-events: none;
  z-index: 3;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.88) 50%, transparent 51%),
    radial-gradient(circle, rgba(255,255,255,0.88) 50%, transparent 51%),
    radial-gradient(circle, rgba(255,255,255,0.88) 50%, transparent 51%),
    radial-gradient(circle, rgba(255,255,255,0.88) 50%, transparent 51%);
  background-size: 5px 5px, 5px 5px, 5px 5px, 5px 5px;
  background-position: top left, top right, bottom left, bottom right;
  background-repeat: no-repeat;
}

/* =========================================
   Navigation
   ========================================= */
nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 4rem;
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid transparent;
  transition: top 0.45s ease, max-width 0.45s ease, padding 0.45s ease,
              border-radius 0.45s ease, box-shadow 0.45s ease,
              border-color 0.45s ease, background 0.45s ease;
}

nav.scrolled {
  top: 1.1rem;
  max-width: 320px;
  padding: 0.6rem 2.2rem;
  border-radius: 100px;
  border-color: var(--border);
  background: rgba(250, 250, 248, 0.97);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-links {
  display: flex;
  gap: 2.4rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}


/* =========================================
   Hero
   ========================================= */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 5rem;
  padding: 10rem 4rem 5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-photo {
  align-self: center;
}

.hero-photo img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 52% 38%, black 38%, transparent 100%);
  mask-image: radial-gradient(ellipse 88% 82% at 52% 38%, black 38%, transparent 100%);
}


.hero-eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4rem, 10vw, 9.5rem);
  line-height: 1.0;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-role {
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.hero-types {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.hero-types li {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-weight: 400;
}

.hero-tagline {
  max-width: 480px;
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 3rem;
  font-weight: 300;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.05rem 2.5rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  box-shadow: 0 4px 24px rgba(28, 28, 30, 0.22);
  margin-top: 0.5rem;
}

/* Shimmer sweep */
.cta-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: skewX(-18deg);
  animation: ctaShimmer 3.2s ease-in-out infinite;
}

@keyframes ctaShimmer {
  0%   { left: -100%; }
  45%  { left: 160%; }
  100% { left: 160%; }
}

/* Arrow */
.cta-btn::after {
  content: '→';
  transition: transform 0.22s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(28, 28, 30, 0.28), 0 0 0 4px rgba(139, 115, 85, 0.18);
}

.cta-btn:hover::after {
  transform: translateX(5px);
}

/* =========================================
   Floating CTA
   ========================================= */
.float-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.9rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(28, 28, 30, 0.28), 0 2px 8px rgba(28, 28, 30, 0.14);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.38s ease, transform 0.38s ease, box-shadow 0.28s ease;
}

.float-cta.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.float-cta::after {
  content: '→';
  transition: transform 0.22s ease;
}

.float-cta:hover {
  box-shadow: 0 14px 40px rgba(28, 28, 30, 0.34), 0 0 0 4px rgba(139, 115, 85, 0.18);
}

.float-cta:hover::after {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .float-cta {
    bottom: 1.25rem;
    right: 1.25rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.8125rem;
  }
}

/* =========================================
   Shared
   ========================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 4rem;
}

.section-label {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* =========================================
   Services
   ========================================= */
.services {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}

.services h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.18;
  margin-bottom: 4rem;
}

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

.service-card {
  padding: 2.75rem 2.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.07);
}

.service-num {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 2rem;
}

.service-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.3;
  min-height: 3.6rem;
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
}

/* =========================================
   About
   ========================================= */
.about {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: start;
}

.about-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 2.875rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1.75rem;
}

.about-text p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.125rem;
  font-weight: 300;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.stack-label {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.stack-list {
  list-style: none;
  border-top: 1px solid var(--border);
}

.stack-list li {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.stack-list li span {
  font-family: 'Playfair Display', serif;
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--accent);
  width: 2rem;
  text-align: center;
  line-height: 1;
}

/* =========================================
   Contact
   ========================================= */
.contact {
  padding: 8rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-inner {
  max-width: 600px;
  padding: 0 2rem;
}

.contact h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.contact-sub {
  font-size: 1.0625rem;
  color: var(--muted);
  margin-bottom: 3rem;
  font-weight: 300;
}

.contact-email {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  margin-bottom: 3.5rem;
  transition: color 0.25s;
}

.contact-email:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, transform 0.25s ease,
              box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  animation: socialShake 5s ease-in-out infinite;
}

.social-links a:nth-child(2) { animation-delay: 1.7s; }
.social-links a:nth-child(3) { animation-delay: 3.4s; }

@keyframes socialShake {
  0%, 88%, 100% { rotate: 0deg; }
  90%           { rotate: -5deg; }
  92%           { rotate: 5deg; }
  94%           { rotate: -3deg; }
  96%           { rotate: 2deg; }
  98%           { rotate: 0deg; }
}

/* Live shimmer sweep */
.social-links a::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: socialShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

.social-links a:nth-child(2)::before { animation-delay: 1.35s; }
.social-links a:nth-child(3)::before { animation-delay: 2.7s; }

@keyframes socialShimmer {
  0%, 25%  { left: -120%; }
  60%, 100% { left: 140%; }
}

.social-links a svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.25s ease;
  position: relative;
}

.social-links a:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 32px rgba(28, 28, 30, 0.22);
  animation-play-state: paused;
  rotate: 0deg;
}

.social-links a:hover svg {
  opacity: 1;
}

.social-links a:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 3px 12px rgba(28, 28, 30, 0.12);
  transition-duration: 0.1s;
  animation-play-state: paused;
  rotate: 0deg;
}

/* =========================================
   Footer
   ========================================= */
footer {
  padding: 2.25rem 4rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 960px) {
  /* Die — smaller, shadow removed to prevent viewport bleed */
  #die-wrap {
    left: -18px;
    top: -18px;
    filter: none;
  }

  #die {
    width: 80px;
    height: 80px;
  }

  .face {
    width: 80px;
    height: 80px;
    border-radius: 8px;
  }

  .face.front  { transform: rotateY(0deg)    translateZ(40px); }
  .face.back   { transform: rotateY(180deg)  translateZ(40px); }
  .face.right  { transform: rotateY(90deg)   translateZ(40px); }
  .face.left   { transform: rotateY(-90deg)  translateZ(40px); }
  .face.top    { transform: rotateX(90deg)   translateZ(40px); }
  .face.bottom { transform: rotateX(-90deg)  translateZ(40px); }

  .face-corners {
    inset: 6px;
    background-size: 3px 3px, 3px 3px, 3px 3px, 3px 3px;
  }

  .face-text {
    font-size: 15px;
  }

  /* Hero — single column on tablet/mobile */
  .hero {
    grid-template-columns: 1fr;
    padding: 8rem 2rem 5rem;
    gap: 2.5rem;
  }

  .hero-photo {
    display: flex;
    justify-content: center;
    align-self: auto;
    order: -1;
  }

  .hero-photo img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 2px solid var(--border);
    -webkit-mask-image: none;
    mask-image: none;
  }

  nav {
    padding: 1.25rem 2rem;
  }


  .container {
    padding: 0 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  footer {
    padding: 2rem;
  }
}

@media (max-width: 600px) {
  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .hero h1 {
    font-size: 3.75rem;
  }

  .services,
  .about,
  .contact {
    padding: 5rem 0;
  }

  .social-links {
    gap: 1.5rem;
  }
}
