/* ═══════════════════════════════════════════════════════════
   IAN KENYON — style.css
   Global styles: palette, typography, layout, components
   Palette derived from IK logo
═══════════════════════════════════════════════════════════ */

/* ── 1. Custom Properties ──────────────────────────────── */
:root {
  /* Brand palette */
  --cream:        #F5F0E8;
  --cream-dark:   #EDE7D9;
  --charcoal:     #1E2B33;
  --charcoal-mid: #2C3E4A;
  --gold:         #C8922A;
  --gold-light:   #E8B86D;
  --gold-pale:    #FDF6E3;
  --muted:        #6B7280;
  --muted-light:  #9CA3AF;
  --white:        #FFFFFF;

  /* Typography */
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  5rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container: 1100px;
  --nav-h:     72px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(30,43,51,0.08), 0 1px 2px rgba(30,43,51,0.06);
  --shadow-md:  0 4px 16px rgba(30,43,51,0.10), 0 2px 6px rgba(30,43,51,0.06);
  --shadow-lg:  0 12px 40px rgba(30,43,51,0.14), 0 4px 12px rgba(30,43,51,0.08);

  /* Transitions */
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1);
  --dur-fast:   150ms;
  --dur-base:   250ms;
  --dur-slow:   400ms;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }

/* Focus visible — accessible, not ugly */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── 3. Typography ─────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
}

p { max-width: 68ch; }

/* ── 4. Layout Utilities ───────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-24);
}

/* ── 5. Animation ──────────────────────────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp var(--dur-slow) var(--ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 6. Section Labels ─────────────────────────────────── */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.section-intro {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: var(--space-12);
  line-height: 1.7;
}

/* ── 7. Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--dur-base) var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(200,146,42,0.3);
}
.btn--primary:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 16px rgba(200,146,42,0.4);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--charcoal);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-xs);
}

/* ── 8. Navigation ─────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(245,240,232,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--cream-dark);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: opacity var(--dur-fast) var(--ease);
}
.nav-logo:hover { opacity: 0.8; }

.logo-img { width: 36px; height: 36px; object-fit: contain; }

.nav-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--charcoal);
  position: relative;
  transition: color var(--dur-fast) var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}
.nav-link:hover { color: var(--gold); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link--cta {
  background: var(--charcoal);
  color: var(--cream);
  padding: 0.4rem 1.1rem;
  border-radius: 4px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-link--cta::after { display: none; }
.nav-link--cta:hover { background: var(--gold); color: var(--white); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all var(--dur-base) var(--ease);
}

/* ── 9. Hero ───────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

/* Subtle grain texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

.hero-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-8);
  position: relative;
}

.hero-content { max-width: 600px; }

.hero-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-6);
}

.hero-heading {
  font-size: clamp(var(--text-6xl), 10vw, var(--text-7xl));
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--charcoal);
  margin-bottom: var(--space-8);
}

.hero-statement {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.5;
  margin-bottom: var(--space-10);
  max-width: 44ch;
}

.hero-statement em {
  color: var(--gold);
  font-style: italic;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

/* Large decorative iK mark */
.hero-mark {
  width: clamp(160px, 20vw, 260px);
  opacity: 1;
  pointer-events: none;
  user-select: none;
}
.hero-mark svg { width: 100%; height: auto; }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted-light);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-dot {
  animation: scrollBounce 2s var(--ease) infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(8px); opacity: 0.3; }
}

/* ── 10. About ─────────────────────────────────────────── */
.about {
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-16);
  align-items: start;
}

.about-lead {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.65;
  color: var(--charcoal);
  margin-bottom: var(--space-6);
  max-width: 58ch;
}

.about-body {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: var(--space-8);
  max-width: 58ch;
}

.about-links {
  display: flex;
  gap: var(--space-6);
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--charcoal);
  border-bottom: 1.5px solid var(--cream-dark);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.about-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

.about-accent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  padding-top: var(--space-4);
}

.accent-line {
  width: 1.5px;
  height: 80px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

.accent-quote {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  max-height: 280px;
  line-height: 1.6;
  border-left: none;
}

/* ── 11. Projects ──────────────────────────────────────── */
.projects { background: var(--cream); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.project-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
  position: relative;
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* Full-card click area */
.project-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.project-card-image {
  height: 200px;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--cream-dark);
}

.project-card-image-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.8;
}

.project-card-body {
  padding: var(--space-6);
}

.project-card-meta {
  margin-bottom: var(--space-3);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 99px;
}
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-badge--active {
  background: rgba(200,146,42,0.12);
  color: #9A6D1A;
}
.status-badge--active::before { background: var(--gold); }
.status-badge--live {
  background: rgba(5,150,105,0.1);
  color: #065F46;
}
.status-badge--live::before { background: #059669; animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.project-card-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.project-card-title a {
  position: relative;
  z-index: 2;
  transition: color var(--dur-fast) var(--ease);
}
.project-card:hover .project-card-title a { color: var(--gold); }

.project-card-desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: var(--space-6);
  max-width: 100%;
}

.project-card-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* ── 12. Get Involved ──────────────────────────────────── */
.get-involved {
  background: var(--charcoal);
}
.get-involved .section-label { color: var(--gold); }
.get-involved .section-intro { color: rgba(245,240,232,0.7); }

.get-involved-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.involve-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-8);
  background: rgba(245,240,232,0.06);
  border: 1px solid rgba(245,240,232,0.12);
  border-radius: 6px;
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.involve-card:hover {
  background: rgba(200,146,42,0.12);
  border-color: var(--gold);
}

.involve-card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--cream);
  transition: color var(--dur-fast) var(--ease);
}
.involve-card:hover .involve-card-title { color: var(--gold-light); }

.involve-card-sub {
  font-size: var(--text-sm);
  color: rgba(245,240,232,0.55);
  line-height: 1.5;
}

/* ── 13. Footer ────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  border-top: 1px solid rgba(245,240,232,0.1);
  padding-block: var(--space-16) var(--space-8);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: var(--space-12);
  align-items: start;
  margin-bottom: var(--space-12);
}

.footer-logo { width: 44px; height: 44px; object-fit: contain; margin-bottom: var(--space-3); }

.footer-hol {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: rgba(245,240,232,0.4);
  text-transform: uppercase;
}

.footer-contact-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--cream);
  margin-bottom: var(--space-4);
}

.footer-form-row {
  display: flex;
  gap: var(--space-2);
}

.footer-input {
  flex: 1;
  background: rgba(245,240,232,0.08);
  border: 1px solid rgba(245,240,232,0.15);
  border-radius: 4px;
  padding: 0.5rem 0.875rem;
  color: var(--cream);
  font-size: var(--text-sm);
  transition: border-color var(--dur-fast) var(--ease);
}
.footer-input::placeholder { color: rgba(245,240,232,0.35); }
.footer-input:focus {
  outline: none;
  border-color: var(--gold);
}

.footer-form-note {
  font-size: var(--text-xs);
  color: rgba(245,240,232,0.35);
  margin-top: var(--space-2);
  max-width: 100%;
}
.footer-form-success {
  font-size: var(--text-xs);
  color: #6EE7B7;
  margin-top: var(--space-2);
  max-width: 100%;
}
.footer-form-error {
  font-size: var(--text-xs);
  color: #FCA5A5;
  margin-top: var(--space-2);
  max-width: 100%;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-end;
}

.footer-link {
  font-size: var(--text-sm);
  color: rgba(245,240,232,0.5);
  transition: color var(--dur-fast) var(--ease);
}
.footer-link:hover { color: var(--gold-light); }

.footer-base {
  border-top: 1px solid rgba(245,240,232,0.08);
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: rgba(245,240,232,0.3);
}

/* ── 14. Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .about-inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .about-accent { flex-direction: row; writing-mode: horizontal-tb; }
  .accent-quote { writing-mode: horizontal-tb; transform: none; max-height: none; }
  .accent-line { width: 40px; height: 1.5px; background: linear-gradient(to right, var(--gold), transparent); }
  .projects-grid { grid-template-columns: 1fr; }
  .get-involved-cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-links { align-items: flex-start; flex-direction: row; }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }

  .section { padding-block: var(--space-16); }

  .nav-logo-text { display: none; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    bottom: 0;
    z-index: 99;
    background: var(--cream);
    border-bottom: 1px solid var(--cream-dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--space-6);
    transform: none;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity var(--dur-base) var(--ease), visibility var(--dur-base) var(--ease);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
  }
  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .nav-link {
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--cream-dark);
    font-size: var(--text-base);
  }
  .nav-link--cta {
    display: block;
    width: 100%;
    margin-top: var(--space-3);
    text-align: center;
    border: none;
    border-top: 1px solid var(--cream-dark);
    padding-top: var(--space-4);
    border-radius: 4px;
  }

  /* Hamburger → X */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .involve-card { padding: var(--space-6); }

  .footer-form-row { flex-direction: column; }
  .footer-form-row .btn { width: 100%; justify-content: center; }
}
