/* ==========================================================================
   TAYFUN KIVRAK  PERSONAL TRAINER
   ========================================================================== */

:root {
  --bg: #0B0B0D;
  --bg-2: #151518;
  --card: #1D1D21;
  --text: #F5F5F5;
  --muted: #A5A5AA;
  --accent: #C7FF3D;
  --line: rgba(255, 255, 255, 0.1);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 76px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(80px, 12vw, 160px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) - 1px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.accent { color: var(--accent); }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Typography ---------- */
.section { padding-block: var(--section-y); }

.section__title {
  font-size: clamp(2rem, 5.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.section__desc {
  margin-top: 18px;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.0625rem;
}

.section__head { margin-bottom: clamp(40px, 6vw, 72px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 32px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--text); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost { border-color: rgba(255, 255, 255, 0.28); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--outline { border-color: var(--line); color: var(--text); }
.btn--outline:hover { border-color: var(--accent); background: var(--accent); color: var(--bg); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
              box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.nav.is-scrolled,
.nav.is-open {
  background: rgba(11, 11, 13, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

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

.nav__brand { display: flex; align-items: center; gap: 12px; line-height: 1.2; }
.nav__logo { height: 28px; width: auto; flex: none; }
.nav__text { display: flex; flex-direction: column; }
.nav__name { font-weight: 800; font-size: 1rem; letter-spacing: 0.08em; }
.nav__role { font-size: 0.6875rem; letter-spacing: 0.28em; color: var(--accent); font-weight: 500; }

.nav__menu { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }

.nav__link {
  position: relative;
  padding: 8px 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__link:hover,
.nav__link.is-active { color: var(--text); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cta { min-height: 44px; padding: 0 22px; }

.nav__toggle {
  display: none;
  position: relative;
  width: 48px; height: 48px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 19px; }
.nav__toggle span:nth-child(2) { top: 27px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { top: 23px; transform: rotate(-45deg); }

@media (max-width: 1100px) {
  .nav__toggle { display: block; }

  .nav__menu {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    height: calc(100dvh - var(--nav-h));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 32px;
    padding: 32px var(--gutter);
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s 0.35s;
    overflow-y: auto;
  }
  .nav.is-open .nav__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    display: block;
    padding: 18px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }
  .nav__link::after { display: none; }
  .nav__link.is-active { color: var(--accent); }
  .nav__cta { min-height: 56px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
  background: var(--bg);
}

.hero__media {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 58%;
  clip-path: inset(0 0 0 100%);
  animation: maskIn 1.1s var(--ease) 0.15s forwards;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(11, 11, 13, 0) 45%),
              linear-gradient(0deg, var(--bg) 0%, rgba(11, 11, 13, 0) 22%);
}
.hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.12);
  animation: settle 1.8s var(--ease) 0.15s forwards;
}

/* Logo shown in the hero media area (replace with a photo later) */
.hero__img--logo {
  position: absolute;
  inset: 0 6vw 0 auto;
  margin-block: auto;
  width: min(30vw, 440px);
  height: auto;
  object-fit: contain;
}

.hero__inner { position: relative; z-index: 2; }
.hero__content { padding-block: 56px 72px; }

.hero__title {
  font-size: clamp(2rem, 6vw, 5.5rem);
  white-space: nowrap;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line__inner {
  display: block;
  transform: translateY(110%);
  animation: lineUp 0.9s var(--ease) forwards;
}
.line:nth-child(1) .line__inner { animation-delay: 0.25s; }
.line:nth-child(2) .line__inner { animation-delay: 0.42s; }
.line:nth-child(3) .line__inner { animation-delay: 0.59s; }

.hero__text {
  max-width: 480px;
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.85s forwards;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 1.05s forwards;
}

@keyframes maskIn { to { clip-path: inset(0 0 0 0); } }
@keyframes settle { to { transform: scale(1); } }
@keyframes lineUp { to { transform: translateY(0); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .hero__title { font-size: clamp(1.7rem, 7.4vw, 4.5rem); }
  .hero__media { width: 100%; }
  .hero__media::after {
    background: linear-gradient(0deg, var(--bg) 4%, rgba(11, 11, 13, 0.55) 55%, rgba(11, 11, 13, 0.72) 100%);
  }
  .hero__img { object-position: center 20%; }
  .hero__img--logo {
    inset: 0; margin: 0; width: 100%; height: 100%;
    object-position: center top;
    opacity: 0.3;
    padding: 96px max(18%, calc(50% - 130px)) 0;
  }
  .hero__content { padding-block: 40px 64px; }
}
@media (max-width: 600px) {
  .hero__title { font-size: 9.4vw; }
}
@media (max-width: 480px) {
  .hero__actions .btn { width: 100%; }
}

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease) var(--d, 0ms), transform 0.9s var(--ease) var(--d, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.img-reveal { position: relative; overflow: hidden; background: var(--card); }
.js .img-reveal {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease);
}
.js .img-reveal img {
  transform: scale(1.14);
  transition: transform 1.5s var(--ease);
}
.js .img-reveal.is-visible { clip-path: inset(0 0 0 0); }
.js .img-reveal.is-visible img { transform: scale(1); }

/* ---------- About ---------- */
.about { background: var(--bg-2); }
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
}
.about__media { --frame-offset: 20px; position: relative; }
.about__media .img-reveal { position: relative; z-index: 1; aspect-ratio: 3 / 4; border-radius: 20px; }

/* Thin outline frame, offset up-left behind the photo */
.frame {
  position: absolute;
  inset: calc(var(--frame-offset) * -1) var(--frame-offset) var(--frame-offset) calc(var(--frame-offset) * -1);
  z-index: 0;
  border: 1px solid rgba(199, 255, 61, 0.55);
  border-radius: 20px;
  pointer-events: none;
}
.js .frame {
  opacity: 0;
  transform: translate(calc(var(--frame-offset) * 0.6), calc(var(--frame-offset) * 0.6));
  transition: opacity 0.9s var(--ease) 0.35s, transform 1.1s var(--ease) 0.35s;
}
.js .img-reveal.is-visible + .frame { opacity: 1; transform: none; }
@media (max-width: 600px) { .about__media { --frame-offset: 12px; } }
.about__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }

.about__content > * + * { margin-top: 20px; }
.about__sub {
  margin-top: 16px !important;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}
.about__content .lead { margin-top: 32px; font-size: 1.25rem; font-weight: 500; line-height: 1.5; }
.about__content p { color: var(--muted); }
.about__content .lead { color: var(--text); }

.steps { display: grid; gap: 0; margin-top: 28px !important; border-top: 1px solid var(--line); }
.steps li {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.steps strong { color: var(--text); font-weight: 600; }
.steps__num { flex: none; width: 28px; color: var(--accent); font-weight: 600; font-size: 0.875rem; padding-top: 3px; }
.about__content .btn { margin-top: 36px; }

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; }
}

/* ---------- Packages ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 860px;
  margin-inline: auto;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.4vw, 26px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.plan--featured { border-color: var(--accent); }
/* Plan hover is handled separately so it does not conflict with the reveal transition */
.js .plan.is-visible {
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
              opacity 0.9s var(--ease) var(--d, 0ms);
}
.plan:hover,
.js .plan.is-visible:hover { border-color: var(--accent); transform: translateY(-6px); }

.plan__badge {
  position: absolute;
  top: -11px;
  left: 22px;
  padding: 3px 12px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.5;
}
.plan__name { margin-top: 4px; font-size: 1.25rem; font-weight: 800; letter-spacing: 0.01em; }

.quota { margin-top: 14px; }
.quota__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quota__label {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent);
  font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.14em;
}
.quota__count { color: var(--muted); font-weight: 600; }
.quota__count strong { color: var(--text); font-weight: 800; }
.quota__bar { height: 5px; margin-top: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 999px; overflow: hidden; }
.quota__bar span {
  display: block; height: 100%;
  width: var(--fill, 0%);
  background: var(--accent);
  border-radius: 999px;
  transform-origin: left;
}
.js .plan .quota__bar span { transform: scaleX(0); transition: transform 1.1s var(--ease) 0.3s; }
.js .plan.is-visible .quota__bar span { transform: scaleX(1); }
.quota__note { margin-top: 6px; color: var(--accent); font-size: 0.75rem; font-weight: 600; }

.price { margin-top: 14px; }
.price__top { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.price__old { color: var(--muted); font-size: 0.8125rem; font-weight: 500; }
.price__badge {
  padding: 2px 10px;
  background: rgba(199, 255, 61, 0.12);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em;
}
.price__top :empty { display: none; }
.price__now {
  margin-top: 2px;
  font-size: clamp(1.75rem, 3.4vw, 2.125rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.price__now.is-text { font-size: 1.125rem; letter-spacing: 0; line-height: 1.5; padding-block: 8px 6px; }
.price__week { min-height: 1.5em; margin-top: 10px; color: var(--muted); font-size: 0.75rem; }

.duration { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.duration legend { padding: 0; margin-bottom: 8px; color: var(--muted); font-size: 0.625rem; font-weight: 800; letter-spacing: 0.14em; }
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.seg__item { position: relative; display: block; cursor: pointer; }
.seg__item input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg__item span {
  display: grid; place-items: center;
  min-height: 38px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem; font-weight: 700;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.seg__item:hover input:not(:checked) + span { color: var(--text); }
.seg__item input:checked + span { background: var(--accent); color: var(--bg); }
.seg__item input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

.plan__list {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}
.plan__list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.plan__list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.3em;
  width: 12px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23C7FF3D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan__list li.is-strong { color: var(--text); font-weight: 700; }
.plan__pay { margin-top: auto; align-self: stretch; min-height: 46px; border-radius: 8px; font-size: 0.75rem; }

@media (max-width: 860px) {
  .plans { grid-template-columns: 1fr; max-width: 560px; }
}
/* ---------- Process ---------- */
.process { background: var(--bg-2); }
.process__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  max-width: 960px;
}
.process__item {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.process__num {
  flex: none;
  width: 2rem;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.process__name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.process__item p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9875rem;
  max-width: 36em;
}
.process__note {
  margin-top: 12px !important;
  color: var(--accent) !important;
  font-size: 0.8125rem !important;
  font-weight: 600;
  letter-spacing: 0.04em;
}
@media (max-width: 760px) {
  .process__list { grid-template-columns: 1fr; gap: 0; }
  .process__item { padding: 20px 0; }
}

/* ---------- Fit / Kimler icin ---------- */
.fit__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  max-width: 960px;
}
.fit__label {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 18px;
}
.fit__col--yes .fit__label { color: var(--accent); }
.fit__col--no .fit__label { color: var(--muted); }
.fit__list {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.fit__list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  font-size: 0.9875rem;
  line-height: 1.55;
}
.fit__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 14px;
  height: 14px;
}
.fit__col--yes .fit__list li::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23C7FF3D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fit__col--no .fit__list li::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23A5A5AA' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 4l8 8M12 4l-8 8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fit__note {
  margin-top: clamp(36px, 5vw, 56px);
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}
@media (max-width: 760px) {
  .fit__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- FAQ ---------- */
.faq__wrap { max-width: 820px; }
.faq__list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq__item {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.25s var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex: none;
  width: 1.5rem;
  text-align: center;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.25s var(--ease);
}
.faq__item[open] summary { color: var(--accent); }
.faq__item[open] summary::after { content: "\2212"; }
.faq__item summary:hover { color: var(--accent); }
.faq__item p {
  padding: 0 4px 22px;
  color: var(--muted);
  font-size: 0.9875rem;
  max-width: 58ch;
}

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}
.wa-float:hover { transform: translateY(-3px) scale(1.04); filter: brightness(1.05); }
.wa-float:active { transform: translateY(0) scale(1); }
@media (max-width: 600px) {
  .wa-float { width: 52px; height: 52px; }
}

/* ---------- Gallery ---------- */
.gallery { padding-bottom: calc(var(--section-y) * 0.9); overflow: hidden; background: var(--bg-2); }
.gallery__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.gallery__controls { display: flex; gap: 12px; flex: none; }
.arrow {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), opacity 0.3s;
}
.arrow:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.arrow:disabled { opacity: 0.3; cursor: default; }

.gallery__track {
  --gap: 24px;
  --per: 2;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Align the start with the container */
  --pad: max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter)));
  padding-inline: var(--pad);
  scroll-padding-inline: var(--pad);
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline-offset: -4px; }

.slide {
  flex: 0 0 calc((min(100vw, 1280px) - 2 * var(--gutter) - (var(--per) - 1) * var(--gap)) / var(--per));
  scroll-snap-align: start;
}
.slide__img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--card); border-radius: 8px; }
.slide__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.slide__cap strong { font-weight: 700; }
.slide__cap span { color: var(--accent); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.slide__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
  user-select: none;
}
.slide:hover .slide__img img { transform: scale(1.05); }

@media (max-width: 960px) {
  .gallery__track { --per: 1.3; --gap: 16px; }
}
@media (max-width: 600px) {
  .gallery__track { --per: 1.08; --gap: 14px; }
  .gallery__head { flex-direction: column; align-items: flex-start; gap: 28px; }
}

/* ---------- Form (checkout) ---------- */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 1rem; /* prevents iOS zoom */
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23A5A5AA' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}
.field select:invalid { color: var(--muted); }
.field select option { background: var(--card); color: var(--text); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255, 255, 255, 0.22); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field.has-error input, .field.has-error select { border-color: #ff6b6b; }
.field__error { min-height: 0; font-size: 0.8125rem; color: #ff8a8a; }
.field__error:empty { display: none; }

.form__submit { width: 100%; min-height: 56px; margin-top: 4px; }
.form__status { min-height: 1.5em; font-size: 0.9375rem; color: var(--muted); }
.form__status.is-success { color: var(--accent); }
.form__status.is-error { color: #ff8a8a; }

/* ---------- Footer ---------- */
.footer { padding-block: clamp(48px, 7vw, 80px) 32px; background: var(--bg); border-top: 1px solid var(--line); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer__name { font-weight: 800; letter-spacing: 0.06em; font-size: 1rem; }
.footer__desc { margin-top: 10px; color: var(--muted); max-width: 320px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 12px 28px; align-content: flex-start; }
.footer__nav a { color: var(--muted); font-size: 0.9375rem; padding: 4px 0; transition: color 0.3s var(--ease); }
.footer__nav a:hover { color: var(--accent); }
.footer__copy { margin-top: clamp(40px, 6vw, 64px); padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8125rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .gallery__track { scroll-behavior: auto; }
  .js .reveal, .js .img-reveal, .js .img-reveal img { transform: none; clip-path: none; opacity: 1; }
}
