/* ==========================================================================
   IKE Products — Portfolio Site
   ========================================================================== */

:root {
  /* Brand palette (sampled from IKE Products logo assets) */
  --accent-orange: #e2703d;
  --accent-peach: #f3b978;
  --accent-coral: #e2794f;
  --accent-terracotta: #a6443f;

  --maroon-900: #1c100c;
  --maroon-800: #241512;
  --maroon-700: #2e1b15;
  --maroon-600: #3a2018;

  --cream-050: #fdf6f0;

  --font-heading: 'Poppins', 'Hiragino Sans', sans-serif;
  --font-body: 'Inter', 'Hiragino Sans', sans-serif;

  --container-width: 1140px;
  --header-height: 76px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.25s ease;
}

/* ---- Theme tokens -------------------------------------------------- */
:root,
:root[data-theme="dark"] {
  --bg: var(--maroon-900);
  --bg-alt: var(--maroon-800);
  --surface: var(--maroon-700);
  --surface-hover: var(--maroon-600);
  --text-primary: var(--cream-050);
  --text-secondary: #cbb3a6;
  --text-muted: #9a8175;
  --border-color: rgba(253, 246, 240, 0.1);
  --header-bg: rgba(28, 16, 12, 0.85);
  --accent: var(--accent-peach);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: var(--cream-050);
    --bg-alt: #f5e9df;
    --surface: #ffffff;
    --surface-hover: #fbf1e8;
    --text-primary: var(--maroon-900);
    --text-secondary: #5c4438;
    --text-muted: #8a7268;
    --border-color: rgba(43, 26, 21, 0.1);
    --header-bg: rgba(253, 246, 240, 0.85);
    --accent: var(--accent-orange);
  }
}

:root[data-theme="light"] {
  --bg: var(--cream-050);
  --bg-alt: #f5e9df;
  --surface: #ffffff;
  --surface-hover: #fbf1e8;
  --text-primary: var(--maroon-900);
  --text-secondary: #5c4438;
  --text-muted: #8a7268;
  --border-color: rgba(43, 26, 21, 0.1);
  --header-bg: rgba(253, 246, 240, 0.85);
  --accent: var(--accent-orange);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* Faint brand texture behind the whole page — deliberately low-opacity so
   the wordmark baked into the source photo never competes with real text. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('../images/bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.05;
  pointer-events: none;
}
:root[data-theme="light"] body::before { opacity: 0.035; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body::before { opacity: 0.035; }
}

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

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

ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

p { margin: 0 0 1em; }

/* ---- Fade-in on scroll ------------------------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in { transition: none; }
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-terracotta));
  color: #fff;
  box-shadow: 0 8px 24px rgba(166, 68, 63, 0.35);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition), border-color var(--transition);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark { height: 40px; width: 40px; }
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}
.logo-text em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
}

.main-nav ul {
  display: flex;
  gap: 32px;
}
.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-link:hover,
.nav-link.active { color: var(--text-primary); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color var(--transition), background-color var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-icon {
  position: absolute;
  font-size: 1.05rem;
  transition: opacity var(--transition), transform var(--transition);
}
.theme-icon-sun { opacity: 0; transform: scale(0.6) rotate(-90deg); }
.theme-icon-moon { opacity: 1; transform: scale(1) rotate(0); }
:root[data-theme="light"] .theme-icon-sun { opacity: 1; transform: scale(1) rotate(0); }
:root[data-theme="light"] .theme-icon-moon { opacity: 0; transform: scale(0.6) rotate(90deg); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-icon-sun { opacity: 1; transform: scale(1) rotate(0); }
  :root:not([data-theme="dark"]) .theme-icon-moon { opacity: 0; transform: scale(0.6) rotate(90deg); }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle span {
  width: 18px; height: 2px;
  background: var(--text-primary);
  margin-inline: auto;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 32%, rgba(243, 185, 120, 0.16), transparent 42%),
    radial-gradient(circle at 20% 85%, rgba(166, 68, 63, 0.35), transparent 55%),
    linear-gradient(160deg, var(--maroon-600) 0%, var(--maroon-900) 65%);
}
.hero-watermark {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 620px);
  opacity: 0.9;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.35));
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,16,12,0) 0%, rgba(28,16,12,0.4) 65%, var(--bg) 100%);
}
:root[data-theme="light"] .hero-overlay {
  background: linear-gradient(180deg, rgba(28,16,12,0.15) 0%, rgba(28,16,12,0.35) 65%, var(--bg) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: var(--header-height);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-eyebrow {
  color: var(--accent-peach);
  font-family: var(--font-heading);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 16px;
  opacity: 0.85;
}
.hero-title {
  color: #fff;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.35);
}
.hero-subtitle {
  color: #f0ddd0;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 40px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.hero .btn-ghost:hover { border-color: var(--accent-peach); color: var(--accent-peach); }

/* Hero content animates in on load via pure CSS — never gated behind JS
   or scroll (unlike .fade-in below), since it's visible without scrolling. */
.hero-anim {
  opacity: 0;
  animation: hero-fade-up 0.8s ease forwards;
  animation-delay: var(--anim-delay, 0s);
}
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-anim { animation: none; opacity: 1; }
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 999px;
  z-index: 1;
}
.scroll-indicator span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: #fff;
  border-radius: 999px;
  animation: scroll-dot 1.8s ease infinite;
}
@keyframes scroll-dot {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* ==========================================================================
   Section shared
   ========================================================================== */
section { padding: 110px 0; }
.section-eyebrow {
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 12px;
  text-align: center;
}
.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 64px;
}

/* ==========================================================================
   Services
   ========================================================================== */
.services { background: var(--bg-alt); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-coral);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.service-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ==========================================================================
   Product
   ========================================================================== */
.product-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: center;
}
.product-media {
  display: flex;
  justify-content: center;
}
.product-media img {
  width: 100%;
  max-width: 280px;
  border-radius: 28px;
  border: 6px solid var(--surface);
  box-shadow: 0 24px 50px rgba(0,0,0,0.18);
}
.product-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.product-tagline {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.product-desc { color: var(--text-secondary); }
.product-features {
  margin: 20px 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-features li {
  position: relative;
  padding-left: 26px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-coral);
  font-weight: 700;
}
.product-cta { gap: 10px; }
.product-cta-icon { width: 18px; height: 18px; fill: currentColor; }

/* ==========================================================================
   Portfolio
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.portfolio-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.portfolio-item:hover img { transform: scale(1.06); }

/* ==========================================================================
   About
   ========================================================================== */
.about { background: var(--bg-alt); }
.about-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: center;
}
.about-media img {
  border-radius: 50%;
  border: 6px solid var(--surface);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
.about-content .section-eyebrow,
.about-content .section-title { text-align: left; }
.about-content .section-title { margin-bottom: 24px; }
.about-name {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.about-name span {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-left: 10px;
}
.about-role {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.about-desc { color: var(--text-secondary); }

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.skills-list li span {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-inner { text-align: center; }
.contact-lead {
  color: var(--text-secondary);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: 32px;
}
.contact-email {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  color: var(--text-primary);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 40px;
  transition: color var(--transition);
}
.contact-email:hover { color: var(--accent); }

.social-links {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.social-links a {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-color);
  transition: transform var(--transition), border-color var(--transition), background-color var(--transition);
}
.social-links a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.social-links svg {
  width: 20px; height: 20px;
  fill: var(--text-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-logo .logo-mark { height: 32px; width: 32px; }
.footer-nav {
  display: flex;
  gap: 24px;
}
.footer-nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--accent); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  width: 100%;
  text-align: center;
  order: 3;
}

/* ==========================================================================
   Responsive — 768px breakpoint (mobile-first overrides for larger handled
   above; below is the mobile layout)
   ========================================================================== */
@media (max-width: 768px) {
  :root { --header-height: 64px; }

  section { padding: 72px 0; }

  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 24px;
    gap: 20px;
  }

  .nav-toggle { display: flex; }

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

  .product-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .product-content .section-eyebrow,
  .product-content .section-title { text-align: center; }
  .product-heading { flex-direction: column; text-align: center; }

  .portfolio-grid { grid-template-columns: 1fr; }

  .about-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .about-media img { width: 200px; height: 200px; margin-inline: auto; }
  .about-content .section-eyebrow,
  .about-content .section-title { text-align: center; }
  .about-name span { display: block; margin-left: 0; margin-top: 4px; }
  .skills-list { justify-content: center; }

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

  .hero-watermark {
    width: 60vw;
    top: 22%;
    right: 50%;
    transform: translate(50%, 0);
    opacity: 0.16;
  }
}
