/* ============================================================
   HAPPINESS CORNER — THEME
   Edit the values in :root to change colors and fonts sitewide.
   ============================================================ */

/* 1) Load fonts — swap these URLs/names to change typefaces */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  /* ---------- FONTS ---------- */
  --serif: 'Inter', system-ui, sans-serif;  /* Headings, logo, quotes, numbers (was Cormorant Infant) */
  --sans:  'DM Sans', sans-serif;        /* Body text, nav, buttons, forms */

  /* ---------- BRAND COLORS ---------- */
  --sun:       #ffd923;   /* Yellow accent — tags, buttons on dark, avatars */
  --sun-dark:  #E8A000;   /* Darker gold — testimonial stars */
  --coral:     #D94A3C;   /* Primary accent — italic text, hover states */
  --mint:      #BED62F;   /* Green/lime — pillar card, avatar (Ador brand green) */
  --sky:       #0da1e9;   /* Blue — pillars bg */

  /* ---------- NEUTRALS ---------- */
  --ink:       #191919;   /* Primary text + dark section backgrounds */
  --ink-soft:  #3d3d3d;   /* Secondary text */
  --cream:     #FFFBF0;   /* Page background + light text on dark */
  --white:     #FFFFFF;   /* Cards, buttons on dark */

  /* ---------- SECTION BACKGROUNDS ---------- */
  --bg-body:       var(--cream);   /* Body / about / testimonials */
  --bg-services:   var(--mint);    /* Services section — green/lime */
  --bg-dark:       #2A1B3D;        /* Pillars / contact / footer — deep plum */

  /* ---------- DERIVED (rgba) ----------
     Ink channel = 26,26,26  |  Cream channel = 255,251,240  |  Coral channel = 255,107,107
     If you change --ink / --cream / --coral, also update the rgba() values below to match. */
  --nav-bg:           var(--white);             /* solid white nav ribbon */
  --nav-border:       rgba(26,26,26,0.08);
  --card-border:      rgba(26,26,26,0.07);
  --card-shadow:      rgba(26,26,26,0.12);
  --card-shadow-hover:rgba(217,74,60,0.12);

  --on-dark-strong:   rgba(255,251,240,0.8);   /* contact items */
  --on-dark-medium:   rgba(255,251,240,0.7);   /* pillars intro */
  --on-dark-soft:     rgba(255,251,240,0.65);  /* contact subtitle */
  --on-dark-muted:    rgba(255,251,240,0.5);   /* pillars tag */
  --on-dark-faint:    rgba(255,251,240,0.4);   /* footer, contact tag */
  --on-dark-placeholder: rgba(255,251,240,0.35);

  --input-bg:         rgba(255,251,240,0.07);
  --input-border:     rgba(255,251,240,0.15);
  --footer-border:    rgba(255,251,240,0.08);

  /* ---------- LAYOUT ---------- */
  --nav-h: 4rem;          /* approx height of the fixed nav — used to offset hero centering */

  /* ---------- LOGO PEAK COLOR ---------- */
  --logo-peak: var(--mint);  /* green peaks inside the ador-mark; override per-section to recolor */

  /* ---------- LIKE BLINK COLOR ---------- */
  --like-blink: var(--mint); /* color the LIKE letters flash to during the blink */
}

/* ============================================================
   STYLES — these consume the variables above.
   You normally won't need to edit below this line.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* SVG sprite (definitions only; never rendered directly) */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

body {
  font-family: var(--sans);
  background: var(--bg-body);
  color: var(--ink);
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* logo | centered links | right group */
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 3rem;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
}
.nav-links { justify-self: center; }
.nav-right { justify-self: end; display: inline-flex; align-items: center; gap: 0.75rem; }

/* Hamburger — desktop hidden, mobile visible */
.nav-toggle {
  display: none;
  width: 32px; height: 28px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  justify-self: end;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-logo {
  display: inline-flex; align-items: center;
  text-decoration: none;
  color: var(--ink);                        /* drives currentColor in the SVG */
}
.nav-logo .logo-svg { height: 26px; width: 180px; display: block; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--coral); }
.nav-cta {
  background: var(--ink); color: var(--cream);
  padding: 0.5rem 1.25rem; border-radius: 100px;
  font-size: 0.875rem; font-weight: 500;
  text-decoration: none; transition: background 0.2s;
}
.nav-cta:hover { background: var(--mint); color: var(--ink); }

/* Language switcher — same size as the CTA, bold, white on green */
.nav-lang {
  background: var(--mint);
  border: none;
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nav-lang:hover { background: var(--ink); color: var(--white); }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: row;
  justify-content: flex-start; align-items: center;
  gap: 3rem;
  padding: 7rem 3rem 3rem;
  position: relative;
  /* overflow hidden so the logo bleeds to the section edges but never spills into the next section */
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.hero-photo {
  position: absolute;
  right: 0;
  /* Center within the area BELOW the fixed nav, not within the full hero box. */
  top: calc(50% + var(--nav-h) / 2);
  height: 88%;                          /* 20% smaller than the previous 110% */
  width: auto;
  aspect-ratio: 462.751 / 231.3755;     /* matches the SVG viewBox (≈ 2 / 1) */
  transform: translate(45%, -50%);      /* shift right by 45% of its width → 55% visible, 45% bleeds offscreen */
  display: block;                       /* removes the inline baseline gap so the A is truly centered */
  pointer-events: none;
  z-index: 0;
  color: var(--ink);                    /* feeds currentColor inside the inline SVG */
}

/* ----- LIKE letters: blink twice, briefly, every 8s in --like-blink color ----- */
.like-letters { animation: blink-like 8s infinite; }
@keyframes blink-like {
  0%,   87.5% { fill: currentColor; }
  88%,  90%   { fill: var(--like-blink); }
  91%,  92.5% { fill: currentColor; }
  93%,  94.5% { fill: var(--like-blink); }
  95%,  100%  { fill: currentColor; }
}
@media (prefers-reduced-motion: reduce) {
  .like-letters { animation: none; }
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.4;
  animation: float 4s ease-in-out infinite;
}
.blob-1 { width: 760px; height: 760px; background: var(--sun);   top: -160px;  right: -140px; animation-delay: 0s;   }
.blob-2 { width: 540px; height: 540px; background: var(--mint);  bottom: -80px; left: 45%;   animation-delay: 1.2s; }
.blob-3 { width: 420px; height: 420px; background: var(--coral); top: 40%;     left: 60%;    animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  50%      { transform: translateY(-70px) translateX(20px) scale(1.12); }
}

.hero-content { position: relative; z-index: 1; max-width: min(780px, 60%); }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--mint); color: var(--ink);
  padding: 6px 16px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 500;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}
.hero-tag::before { content: '✦'; font-size: 10px; }
.hero-tag sup {
  font-size: 0.6em;
  vertical-align: super;
  line-height: 0;
  margin-left: -0.18em;  /* close any kerning gap so "th" sits flush against "30" */
  letter-spacing: 0;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 600; line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--white);
  animation: fadeUp 0.6s ease 0.1s both;
}
.hero h1 em { font-style: italic; color: var(--mint); white-space: nowrap; }
.hero-sub {
  font-size: 1.15rem; font-weight: 300;
  color: rgba(255,255,255,0.75); line-height: 1.7;
  max-width: 560px; margin-bottom: 2.5rem;
  animation: fadeUp 0.6s ease 0.2s both;
}
.hero-actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  animation: fadeUp 0.6s ease 0.3s both;
}
.btn-primary {
  background: var(--white); color: var(--ink);
  padding: 0.85rem 2rem; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
  border: 2px solid var(--white);
}
.btn-primary:hover { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.btn-secondary {
  background: transparent; color: var(--white);
  padding: 0.85rem 2rem; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
  border: 2px solid var(--white);
}
.btn-secondary:hover { background: var(--white); color: var(--ink); }

.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 0.75rem; color: rgba(255,255,255,0.6); letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 0.6s ease 0.5s both;
}
.scroll-line {
  width: 1px; height: 40px; background: rgba(255,255,255,0.6);
  animation: scrollDrop 1.5s ease infinite;
}
@keyframes scrollDrop {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* SECTIONS shared */
section { padding: 6rem 3rem; }
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.section-tag::before { content: ''; display: block; width: 24px; height: 2px; background: var(--coral); }
h2 {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.6vw, 3.45rem);   /* +15% */
  font-weight: 600; line-height: 1.2;
  margin-bottom: 1rem;
}
h2 em { font-style: italic; color: var(--mint); }

/* SERVICES (was Pillars) */
.pillars { background: var(--sun); color: var(--ink); }
.pillars .section-tag { color: var(--ink-soft); }
.pillars .section-tag::before { background: var(--ink); }
.pillars h2 { color: var(--ink); }
.pillars h2 em { color: var(--ink); }
.pillars-intro { font-size: 1.05rem; color: var(--ink-soft); max-width: 560px; margin-bottom: 3.5rem; line-height: 1.7; }
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.pillar-card {
  border-radius: 20px; padding: 2rem;
  position: relative; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--white); color: var(--ink);
  box-shadow: 0 6px 24px rgba(26,26,26,0.06);
}
.pillar-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(26,26,26,0.12); }
.pillar-card.p1,
.pillar-card.p2,
.pillar-card.p3 { background: var(--white); color: var(--ink); }
.pillar-num {
  font-family: var(--serif); font-size: 3rem;
  font-weight: 600;
  color: var(--ink); opacity: 0.12;
  position: absolute; top: 1rem; right: 1.5rem;
  line-height: 1;
}
.pillar-icon {
  width: 56px; height: 56px;
  margin-bottom: 1.25rem;
  color: var(--mint);
}
.pillar-icon svg {
  width: 100%; height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillar-card h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.75rem; }
.pillar-card p { font-size: 0.95rem; line-height: 1.7; color: var(--ink-soft); }

/* ABOUT */
.about { background: var(--white); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.about-carousel { order: 1; }
.about-text     { order: 2; }
.about-text h2 { margin-bottom: 1.5rem; }
.about-text p { font-size: 1rem; line-height: 1.8; color: var(--ink-soft); margin-bottom: 1rem; }
.about-text p strong { color: var(--ink); font-weight: 600; }
.about-values { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.5rem; }
.about-value {
  background: var(--sun); color: var(--ink);
  padding: 6px 14px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 500;
}

/* ABOUT — project carousel */
.about-carousel { display: flex; flex-direction: column; gap: 1.25rem; }
.carousel-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(26,26,26,0.10);
  touch-action: pan-y;            /* allow vertical page scroll; capture horizontal swipes */
  cursor: grab;
}
.carousel-stage:active { cursor: grabbing; }
.carousel-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.7s ease, transform 0.4s ease;
  background: var(--white);
  text-decoration: none; color: inherit;
  /* stop the browser from starting a native link-drag when the user grabs the slide */
  -webkit-user-drag: none;
  user-select: none;
}
.carousel-slide.is-active { opacity: 1; pointer-events: auto; }
.carousel-slide:hover { transform: scale(0.995); }   /* subtle "press" affordance — only the active slide can be hovered */

/* Browser-frame portfolio card */
.browser-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--cream);
  border-bottom: 1px solid var(--card-border);
}
.browser-dots { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.browser-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(26,26,26,0.18);
}
.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-url {
  flex: 1;
  background: var(--white);
  border-radius: 100px;
  padding: 5px 14px;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--card-border);
}

.browser-screen {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}
.browser-screen img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;                          /* always full width, fill the screen area */
  object-position: top center;                /* anchor to the top of the page */
  transform-origin: top center;
  display: block;
  /* keep the swipe gesture on the slider, not the image */
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
  /* Reveal effect: the screenshot is fully clipped + slightly zoomed + transparent,
     then wipes down from the top while fading in and settling back to scale 1. */
  opacity: 0;
  transform: scale(1.04);
  clip-path: inset(0 0 100% 0);
  transition:
    opacity   0.55s ease,
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    clip-path 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.carousel-slide.is-active .browser-screen img {
  opacity: 1;
  transform: scale(1);
  clip-path: inset(0 0 0 0);
  transition-delay: 0.5s;                     /* let the coloured tile + name show first */
}
/* Optional extra zoom — add class="zoom" to crop page-internal whitespace */
.browser-screen img.zoom { transform: scale(1.27); }
.carousel-slide.is-active .browser-screen img.zoom { transform: scale(1.25); }
.browser-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.05;
}
.browser-placeholder[data-tone="yellow"] { background: var(--sun);   color: var(--ink); }
.browser-placeholder[data-tone="coral"]  { background: var(--coral); color: var(--cream); }
.browser-placeholder[data-tone="sky"]    { background: var(--sky);   color: var(--cream); }
.browser-placeholder[data-tone="mint"]   { background: var(--mint);  color: var(--ink); }
.browser-placeholder[data-tone="ink"]    { background: var(--ink);   color: var(--cream); }
.carousel-media {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.15;
}
.carousel-slide[data-tone="yellow"] .carousel-media { background: var(--sun);   color: var(--ink); }
.carousel-slide[data-tone="coral"]  .carousel-media { background: var(--coral); color: var(--cream); }
.carousel-slide[data-tone="sky"]    .carousel-media { background: var(--sky);   color: var(--cream); }
.carousel-slide[data-tone="mint"]   .carousel-media { background: var(--mint);  color: var(--ink); }
.carousel-slide[data-tone="ink"]    .carousel-media { background: var(--ink);   color: var(--cream); }

.carousel-meta {
  flex: 0 0 auto;
  background: var(--white);
  padding: 1.1rem 1.5rem 1.25rem;
  border-top: 1px solid var(--card-border);
}
.carousel-name {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}
.carousel-year {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.carousel-dots { display: flex; justify-content: center; gap: 8px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(26,26,26,0.18);
  border: none; padding: 0; cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.dot:hover { background: rgba(26,26,26,0.4); }
.dot.is-active { background: var(--ink); width: 22px; border-radius: 100px; }

/* ============================================================
   TEAM — yellow section, text left, stacked logos right (peaks recolored coral)
   ============================================================ */
.team {
  background: var(--sun); color: var(--ink);
  --logo-peak:  var(--coral);   /* recolor the green peaks → red here only */
  --like-blink: var(--coral);   /* and make the LIKE letters blink red here too */
}
.team h2 em { color: var(--coral); }

/* Team-section button overrides (the base styles are tuned for the dark hero) */
.team-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }
.team .btn-primary {
  background: var(--ink); color: var(--white);
  border-color: var(--ink);
}
.team .btn-primary:hover {
  background: var(--coral); border-color: var(--coral); color: var(--white);
}
.team .btn-secondary {
  background: transparent; color: var(--ink);
  border-color: var(--ink);
}
.team .btn-secondary:hover {
  background: var(--ink); color: var(--cream);
}
.team-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.team-text h2 { margin-bottom: 1.25rem; }
.team-text p { font-size: 1rem; line-height: 1.8; color: var(--ink-soft); margin-bottom: 1rem; }
.team-text p strong { color: var(--ink); font-weight: 600; }
.team-visual {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;                /* a few pixels between the mark and the wordmark */
  color: var(--ink);        /* feeds currentColor into both inlined sprites */
}
.team-mark,
.team-wordmark {
  width: 100%;
  max-width: 460px;         /* both share the same width */
  height: auto;
  display: block;
}
.team-mark     { aspect-ratio: 462.751 / 231.3755; }   /* the A mark */
.team-wordmark { aspect-ratio: 241.6426 / 35.3652; }   /* the Ador & Happiness wordmark */
@media (max-width: 768px) {
  .team-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   HISTORY TIMELINE — manually navigable slider with pixelated arrows
   ============================================================ */
.history { background: var(--mint); color: var(--ink); }
.history-head { max-width: 900px; margin: 0 auto 3rem; text-align: center; }
.history-head .section-tag { color: var(--ink); justify-content: center; }
.history-head .section-tag::before { background: var(--ink); }
.history-head h2 {
  color: var(--ink);
  margin: 0 auto 1rem;
  display: inline-block;        /* shrink to content so text-align:center on parent works */
  white-space: nowrap;
  max-width: 100%;
}
.history-head h2 em { color: var(--white); font-style: italic; }
@media (max-width: 768px) {
  .history-head h2 { white-space: normal; display: block; }  /* allow wrap on mobile */
}
.history-intro { color: rgba(26,26,26,0.7); font-size: 1rem; line-height: 1.7; }

.history-frame {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Pixelated chevron buttons */
.history-arrow {
  background: var(--ink); color: var(--white);
  border: none; padding: 0; cursor: pointer;
  width: 64px; height: 64px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.history-arrow:hover { background: var(--white); color: var(--ink); transform: scale(1.06); }
.history-arrow:active { transform: scale(0.96); }
.history-arrow:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.history-arrow svg {
  width: 28px; height: 36px;
  shape-rendering: crispEdges;
  image-rendering: pixelated;
}
.history-arrow svg rect { fill: currentColor; }

/* Slide stage */
.history-stage {
  overflow: hidden;
  position: relative;
  touch-action: pan-y;            /* allow vertical page scroll; capture horizontal swipes */
  cursor: grab;
}
.history-stage:active { cursor: grabbing; }
.history-track {
  display: flex;
  width: 100%;                                /* lock track to stage width so translate% behaves */
  align-items: stretch;                       /* every card matches the tallest card's height */
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.history-card {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;                            /* prevent FF flex from shrinking cards */
  display: grid; grid-template-columns: 1fr 1fr;   /* exact 50 / 50 split */
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
}
.history-media {
  position: relative;
  min-height: 363px;                       /* baseline height when text is short */
  display: flex; align-items: center; justify-content: center;
  background: var(--cream);
  overflow: hidden;
  /* The img inside is absolutely inset:0, so the media stretches with the grid row
     (matching .history-text height) and the screenshot fills every pixel. */
  /* fallback type styles for tile-only mode (no <img>) */
  padding: 2.5rem;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.15;
}
.history-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;               /* fill both width and height proportionally */
  object-position: top center;     /* anchor to the top of the image */
  display: block;
  /* keep the swipe gesture on the slider, not the image */
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
/* Tone variants retained for any future tile-only cards */
.history-media[data-tone="yellow"] { background: var(--sun);   color: var(--ink); }
.history-media[data-tone="coral"]  { background: var(--coral); color: var(--cream); }
.history-media[data-tone="sky"]    { background: var(--sky);   color: var(--cream); }
.history-media[data-tone="ink"]    { background: var(--ink);   color: var(--cream); }

.history-text {
  padding: 2.5rem 2.5rem 2.5rem 2.5rem;
  display: flex; flex-direction: column; justify-content: center;
}
.history-year {
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.history-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.history-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Progress bar + counter */
.history-progress {
  max-width: 1100px;
  margin: 2rem auto 0.75rem;
  height: 2px;
  background: rgba(26,26,26,0.18);
  border-radius: 100px;
  overflow: hidden;
}
.history-progress-bar {
  display: block;
  height: 100%;
  width: calc(100% / 10);  /* fallback for 10 slides; JS keeps it in sync */
  background: var(--ink);
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.history-counter {
  text-align: center;
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.history-counter .history-current { font-weight: 700; }
.history-counter .history-divider { opacity: 0.4; margin: 0 0.4em; }
.history-counter .history-total { opacity: 0.6; }

/* Responsive */
@media (max-width: 768px) {
  .history { padding: 4rem 1.5rem; }
  .history-head { margin-bottom: 1.75rem; }
  .history-frame { grid-template-columns: 1fr; gap: 0.75rem; }
  .history-arrow { width: 40px; height: 40px; justify-self: center; }
  .history-arrow svg { width: 18px; height: 24px; }
  .history-arrow--prev { order: 2; }
  .history-arrow--next { order: 3; }
  .history-stage { order: 1; }
  .history-card {
    grid-template-columns: 1fr;          /* photo full width, text below */
    grid-template-rows: auto auto;        /* media + text, both natural height */
    border-radius: 18px;
    /* every card stretches to the row's height = tallest card's content height,
       so the white card is the same size across all 10 slides */
  }
  .history-media {
    min-height: 0;                        /* drop the desktop baseline */
    aspect-ratio: 14 / 9;                 /* 50% taller than the previous 21:9 */
  }
  .history-text {
    display: block;                       /* simple block flow on mobile — no flex-centering */
    padding: 1.5rem;
  }
  .history-year  { font-size: 2.4rem; margin-bottom: 0.5rem; }
  .history-title { font-size: 1.2rem; }
  .history-desc  { font-size: 0.88rem; }
  .history-progress { margin-top: 1.25rem; }
}

/* SERVICES */
.services { background: var(--bg-services); }
.services h2 { margin-bottom: 0.5rem; }
.services-sub { font-size: 1rem; color: var(--ink-soft); margin-bottom: 3rem; line-height: 1.7; max-width: 520px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.service-card {
  background: var(--white); border-radius: 20px;
  padding: 2rem; border: 1.5px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}
.service-card:hover { border-color: var(--coral); transform: translateY(-4px); box-shadow: 0 12px 40px var(--card-shadow-hover); }
.service-num {
  font-family: var(--serif); font-size: 0.9rem;
  font-style: italic; color: var(--coral); margin-bottom: 1rem;
}
.service-card h3 { font-family: var(--serif); font-size: 2.05rem; font-weight: 600; margin-bottom: 0.75rem; } /* +15% x3 */
.service-card p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.7; }
.service-tag {
  display: inline-block; margin-top: 1.25rem;
  font-size: 0.75rem; font-weight: 500;
  color: var(--coral); letter-spacing: 0.05em;
}

/* TESTIMONIALS */
.testimonials { background: var(--sun); }
.testimonials h2 { margin-bottom: 3rem; }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.testi-card {
  background: var(--white); border-radius: 20px;
  padding: 2rem; border: 1px solid var(--card-border);
  transition: transform 0.3s;
}
.testi-card:hover { transform: translateY(-4px); }
.testi-stars { color: var(--sun-dark); font-size: 1rem; margin-bottom: 1rem; letter-spacing: 2px; }
.testi-quote {
  font-family: var(--serif); font-style: italic;
  font-size: 1.05rem; line-height: 1.7; color: var(--ink);
  margin-bottom: 1.5rem;
}
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 500;
  flex-shrink: 0;
}
.av1 { background: var(--sun);      color: var(--ink); }
.av2 { background: var(--mint);     color: var(--ink); }
.av3 { background: var(--coral); color: var(--cream); }
.testi-name { font-size: 0.9rem; font-weight: 500; color: var(--ink); }
.testi-role { font-size: 0.8rem; color: var(--ink-soft); }

/* CONTACT */
.contact { background: var(--coral); color: var(--cream); }
.contact .section-tag { color: var(--on-dark-faint); }
.contact .section-tag::before { background: var(--sun); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: start; }
.contact h2 { color: var(--cream); margin-bottom: 1rem; }
.contact h2 em { color: var(--sun); }
.contact-sub { color: var(--on-dark-soft); line-height: 1.7; font-size: 1rem; margin-bottom: 2rem; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-item { display: flex; align-items: center; gap: 12px; color: var(--on-dark-strong); font-size: 0.95rem; }
.contact-item a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--on-dark-faint); transition: border-color 0.2s, color 0.2s; }
.contact-item a:hover { color: var(--sun); border-bottom-color: var(--sun); }
.contact-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); flex-shrink: 0; }

form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input, textarea, select {
  width: 100%; padding: 0.9rem 1.1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px; color: var(--cream);
  font-family: var(--sans); font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--on-dark-placeholder); }
input:focus, textarea:focus, select:focus { border-color: var(--sun); }
select option { background: var(--ink); }
textarea { resize: vertical; min-height: 130px; }
.form-submit {
  background: var(--sun); color: var(--ink);
  padding: 0.9rem 2rem; border-radius: 100px;
  font-size: 0.95rem; font-weight: 500;
  border: none; cursor: pointer;
  transition: all 0.2s; align-self: flex-start;
}
.form-submit:hover { background: var(--mint); color: var(--ink); }

/* FOOTER */
footer {
  background: var(--white);
  color: var(--ink-soft);
  padding: 4rem 3rem 1.75rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.82rem;
  line-height: 1.65;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.4fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
}
.footer-brand .footer-logo { display: inline-flex; align-items: center; color: var(--ink); margin-bottom: 1rem; }
.footer-brand .footer-logo .logo-svg { height: 28px; width: 200px; display: block; }
.footer-tagline {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1rem;
}
.footer-col p { margin: 0 0 0.85rem; }
.footer-col p:last-child { margin-bottom: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--card-border);
  transition: color 0.2s, border-color 0.2s;
}
.footer-col a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.76rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 600px) {
  footer { padding: 3rem 1.5rem 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
  /* Mobile nav: logo + hamburger only; menu items collapse into a dropdown */
  nav {
    grid-template-columns: 1fr auto;
    padding: 0.55rem 1.25rem;
    gap: 0.5rem;
  }
  .nav-logo   { grid-column: 1; grid-row: 1; justify-self: start; align-self: center; }
  .nav-toggle { grid-column: 2; grid-row: 1; display: inline-flex; justify-self: end; align-self: center; }
  .nav-logo .logo-svg { height: 22px; width: 152px; }   /* trim wordmark a touch on mobile */
  .nav-links,
  .nav-right {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
    padding: 0;
  }
  .nav-links { grid-row: 2; }
  .nav-right { grid-row: 3; }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    justify-self: stretch;
  }
  .nav-right {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    justify-self: stretch;
  }
  nav.is-open .nav-links,
  nav.is-open .nav-right {
    max-height: 400px;
    opacity: 1;
  }
  nav.is-open .nav-links { padding-top: 1.25rem; padding-bottom: 0.25rem; display: flex; }
  nav.is-open .nav-right { padding-bottom: 1.25rem; display: flex; }
  .nav-links a { font-size: 1rem; }
  .nav-cta, .nav-lang { text-align: center; }

  section { padding: 4rem 1.5rem; }

  /* HERO on mobile: text full width, A becomes a backdrop behind the buttons */
  .hero {
    padding: 6rem 1.5rem 2.5rem;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    overflow: hidden;
    position: relative;
  }
  .hero-content {
    max-width: 100%;
    width: 100%;
    position: relative;
    z-index: 2;
  }
  .hero h1, .hero-sub { max-width: 100%; }
  .hero-actions { position: relative; z-index: 3; margin-top: 2rem; }
  .hero-photo {
    /* slightly right-aligned, fully visible, sits in the lower portion after the text */
    top: auto;
    bottom: 6%;
    right: 0;
    left: auto;
    height: auto;
    width: 90%;
    max-width: 480px;
    max-height: none;
    aspect-ratio: 462.751 / 231.3755;
    transform: none;
    z-index: 0;
  }
  .hero-scroll { display: none; }

  .about-inner, .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  footer { text-align: left; }
}
