/* ============================================
   K-INTERACTIVE SOLUTIONS — GLOBAL STYLES
   Editorial / Architectural aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..900,0..100,0..1&family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color system — oxblood red with warm off-white */
  --red: #C8102E;
  --red-deep: #8B0A1F;
  --red-bright: #E63946;
  --ink: #0F0E0C;
  --ink-soft: #2A2724;
  --bone: #F4EFE6;
  --bone-warm: #EBE3D4;
  --cream: #FAF6EE;
  --rule: rgba(15, 14, 12, 0.12);
  --rule-strong: rgba(15, 14, 12, 0.3);

  /* Typography */
  --display: 'Fraunces', 'Times New Roman', serif;
  --body: 'Instrument Sans', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --page-pad: clamp(1.25rem, 4vw, 3rem);
  --max-w: 1440px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

::selection {
  background: var(--red);
  color: var(--cream);
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============ GRAIN OVERLAY ============ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ NAVIGATION ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding: 1rem var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  background: rgba(250, 246, 238, 0.92);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.nav-logo-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.nav-logo-text {
  font-variation-settings: "SOFT" 30;
  white-space: nowrap;
}

.nav-logo-text em {
  font-style: italic;
  color: var(--red);
  font-weight: 400;
}

@media (max-width: 420px) {
  .nav-logo-text { font-size: 1rem; }
}

.nav-menu {
  display: flex;
  gap: 2.25rem;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-menu a {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s;
}

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

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

.nav-menu a.active {
  color: var(--red);
}

.nav-cta {
  background: var(--ink);
  color: var(--cream);
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.3s;
}

.nav-cta:hover {
  background: var(--red);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.3s;
}

@media (max-width: 860px) {
  .nav-menu {
    position: fixed;
    top: 65px;
    right: 0;
    bottom: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 3rem 2rem;
    width: 100%;
    max-width: 320px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    border-left: 1px solid var(--rule);
    align-items: flex-start;
    gap: 1.5rem;
    font-size: 1.1rem;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }
}

/* ============ PAGE HEADER (inner pages) ============ */
.page-header {
  padding: clamp(3rem, 8vw, 6rem) var(--page-pad) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.page-header-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-header-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--red);
}

.page-header-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 8.5vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  max-width: 15ch;
  font-variation-settings: "SOFT" 40, "opsz" 144;
}

.page-header-title em {
  font-style: italic;
  color: var(--red);
  font-weight: 400;
}

.page-header-sub {
  margin-top: 2rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 52ch;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--ink);
  color: var(--bone);
  padding: clamp(3rem, 6vw, 5rem) var(--page-pad) 2rem;
  position: relative;
  z-index: 2;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(244, 239, 230, 0.15);
}

.footer-brand h3 {
  font-family: var(--display);
  font-weight: 300;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.footer-brand h3 em { font-style: italic; color: var(--red-bright); }

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(244, 239, 230, 0.65);
  max-width: 30ch;
  line-height: 1.55;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.5);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  font-size: 0.95rem;
  color: var(--bone);
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--red-bright); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(244, 239, 230, 0.5);
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--red);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--red-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(200, 16, 46, 0.4);
}

.btn-ghost {
  border-color: var(--rule-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.btn-arrow {
  transition: transform 0.3s;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ============ SHARED SECTION STYLES ============ */
.section {
  padding: clamp(3.5rem, 7vw, 6rem) var(--page-pad);
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '§';
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  color: var(--red);
}

.section-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  max-width: 18ch;
  font-variation-settings: "SOFT" 40, "opsz" 144;
}

.section-title em { font-style: italic; color: var(--red); font-weight: 400; }

/* ============ ANIMATION UTILITIES ============ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.25s; }
.reveal-3 { animation-delay: 0.4s; }
.reveal-4 { animation-delay: 0.55s; }
.reveal-5 { animation-delay: 0.7s; }

/* ============ CTA BAND (used on multiple pages) ============ */
.cta-band {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(4rem, 8vw, 7rem) var(--page-pad);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.cta-band-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: end;
  position: relative;
  z-index: 2;
}

.cta-band h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 40;
}

.cta-band h2 em { font-style: italic; color: var(--red-bright); font-weight: 400; }

.cta-band-right {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(244, 239, 230, 0.75);
}

.cta-band-right .btn {
  margin-top: 1.5rem;
  background: var(--red);
  color: var(--cream);
}

.cta-band-right .btn:hover {
  background: var(--cream);
  color: var(--ink);
}

.cta-band::before {
  content: '→';
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 40rem;
  color: rgba(200, 16, 46, 0.06);
  line-height: 1;
  pointer-events: none;
}

@media (max-width: 860px) {
  .cta-band-inner { grid-template-columns: 1fr; }
}
