/* ============================================================
   SHARECORE — single-page agency site
   Design: warm off-white, Swiss-typographic, Inter.
   ============================================================ */

/* ---------- Fonts (self-hosted Unigeo32) ---------- */
@font-face {
  font-family: "Unigeo32";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Unigeo32-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Unigeo32";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/Unigeo32-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Unigeo32";
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Unigeo32-Semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Unigeo32";
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/Unigeo32-Extrabold.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --bg:      #f5f1ed;
  --ink:     #0d0d0d;
  --muted:   #a8a8a8;
  --line:    #d9d5cf;
  --placeholder: #e7e3dc;

  --sans: "Unigeo32", system-ui, -apple-system, "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;

  --pad-x: clamp(18px, 2.6vw, 44px);
  --pad-y: clamp(16px, 1.8vw, 26px);
  --maxw:  2040px;

  font-family: var(--sans);
  font-feature-settings: "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  min-height: 100svh;
  overflow-x: hidden;
}
h1, h2, p, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Page shell ---------- */
.page {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--pad-y) var(--pad-x) clamp(24px, 3vw, 44px);
  min-width: 0;
}
/* Classic fills exactly one screen; Scroll is a normal tall page. */
.design--classic .page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
/* Prevent the wide wordmark SVG from forcing horizontal overflow on
   narrow screens (flexbox min-width:auto). */
.page > * { min-width: 0; }

/* ---------- Top bar ---------- */
.topbar__nav {
  display: flex;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.topbar__item {
  font-size: clamp(10.5px, 0.86vw, 14.5px);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Wordmark ---------- */
.wordmark {
  margin: clamp(4px, 0.6vw, 12px) 0 0;
  line-height: 0;
}
.wordmark__svg { display: block; width: 100%; max-width: 100%; height: auto; }
/* Uploaded SVG logo (replaces the text logotype, fills the width like the wordmark) */
.wordmark__logo { display: block; width: 100%; height: auto; }
.wordmark__text {
  font-family: var(--sans);
  font-weight: 800;                  /* Unigeo32 Extrabold (heaviest weight) */
  font-size: 142.86px;               /* SVG user units → cap-height 100 (Unigeo32 cap ratio 0.7) */
  fill: var(--ink);
  letter-spacing: 0;
}

/* ---------- Main two-column layout ---------- */
.layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 5vw, 40px);
  margin-top: clamp(20px, 2.4vw, 40px);
}

.intro { min-width: 0; }
.intro__heading {
  font-size: clamp(29px, 8.5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.intro__text {
  margin-top: clamp(16px, 2.4vw, 26px);
  max-width: 34em;
  font-size: clamp(16px, 4.3vw, 19px);
  font-weight: 400;
  line-height: 1.42;
  color: var(--ink);
}

/* ---------- Meta / contacts ---------- */
.meta {
  margin-top: clamp(34px, 6vw, 60px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(26px, 5vw, 46px) clamp(20px, 6vw, 40px);
  max-width: 40em;
}
.meta__label {
  font-size: clamp(14px, 3.6vw, 15px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.meta__value {
  font-size: clamp(14px, 3.6vw, 15px);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: from-font;
  width: fit-content;
  transition: color .18s ease;
}
.link:hover { color: var(--ink); }

/* ---------- Showcase (rotating cases) ---------- */
.showcase {
  order: -1;                /* mobile: image sits above intro */
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--placeholder);
  overflow: hidden;
}
.showcase__track { position: absolute; inset: 0; margin: 0; }
.showcase__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease;
}
.showcase__slide.is-active { opacity: 1; visibility: visible; }
.showcase__img { width: 100%; height: 100%; object-fit: cover; }

/* slide transition variant */
.showcase[data-transition="slide"] .showcase__slide {
  transform: translateX(6%);
  transition: opacity .7s ease, transform .7s ease;
}
.showcase[data-transition="slide"] .showcase__slide.is-active {
  transform: translateX(0);
}
/* instant variant */
.showcase[data-transition="none"] .showcase__slide { transition: none; }

.showcase__empty { position: absolute; inset: 0; background: var(--placeholder); }

.showcase__dots {
  position: absolute;
  left: 16px; bottom: 14px;
  display: flex; gap: 8px;
  z-index: 2;
}
.showcase__dot {
  width: 8px; height: 8px; padding: 0;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.showcase__dot:hover { background: rgba(255,255,255,.8); }
.showcase__dot.is-active { background: #fff; transform: scale(1.15); }

/* ---------- Handwritten slogan ("ideas that you love to share") ---------- */
/* shared */
.slogan {
  color: var(--ink);
  display: flex;
  justify-content: center;
}
.slogan__svg { height: auto; display: block; }

/* Classic — mobile: tucked under the showcase, overlapping its bottom edge */
.design--classic .slogan {
  order: -1;
  position: relative;
  z-index: 5;                      /* overlaps on top of the image */
  margin: -60px 0 clamp(10px, 3vw, 20px);
}
.design--classic .slogan__svg { width: min(80%, 340px); }

/* ============================================================
   Desktop layout ≥ 900px
   ============================================================ */
@media (min-width: 900px) {
  /* The content row grows to fill everything below the wordmark and
     distributes vertically: intro lead pinned top, contacts pinned bottom,
     showcase stretched to the full column height. */
  .layout {
    position: relative;                 /* anchor for the floating slogan */
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(32px, 4vw, 80px);
    margin-top: clamp(28px, 4.5vh, 76px);
  }
  /* Handwritten slogan floats in the negative space between the intro
     column and the showcase, echoing the Figma composition. */
  .design--classic .slogan {
    position: absolute;
    left: 50%;                 /* strictly centred on the page */
    top: 47%;
    transform: translate(-50%, -50%);
    width: 24%;
    margin: 0;
    z-index: 3;
    pointer-events: none;
  }
  .design--classic .slogan__svg { width: 100%; }
  .intro {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .meta {
    margin-top: auto;                     /* push contacts to the bottom edge */
    padding-top: clamp(36px, 6vh, 96px);  /* guaranteed breathing room above */
  }
  .showcase {
    order: 0;
    grid-column: 2;
    aspect-ratio: auto;      /* fill the column height instead of a fixed ratio */
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }
  .intro__heading { font-size: clamp(24px, 1.9vw, 32px); }
  .intro__text   { font-size: clamp(16px, 1.15vw, 19px); max-width: 27em; }
  .meta__label, .meta__value { font-size: clamp(14px, 0.92vw, 15px); }
}

/* ============================================================
   Design "Scroll" (v2) — tall page with a horizontal case strip
   ============================================================ */
.design--classic .intro__text p + p { margin-top: 1em; }

.design--scroll .page--scroll {
  padding-inline: 0;               /* the strip is full-bleed; blocks pad themselves */
  padding-bottom: clamp(40px, 6vw, 90px);
}
.design--scroll .wordmark {
  padding-inline: var(--pad-x);
  margin-top: clamp(6px, 1vw, 16px);
}

/* Centred content column — mirrors the 864px column in the design */
.design--scroll .wrap {
  width: 100%;
  max-width: calc(864px + 2 * var(--pad-x));
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---------- Horizontal case strip ---------- */
.strip {
  margin-top: clamp(18px, 3.5vw, 44px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;           /* free scroll, no snapping — handled in main.js */
  -webkit-overflow-scrolling: touch;
  cursor: grab;                    /* draggable with the mouse (see main.js) */
}
.strip.is-dragging { cursor: grabbing; }
.strip.is-dragging .strip__img { pointer-events: none; }
.strip::-webkit-scrollbar { display: none; }
.strip__track { display: flex; width: max-content; }
.strip__item {
  flex: 0 0 auto;
  width: 41.17vw;                  /* 790.4 / 1920 — third tile runs off-screen */
  aspect-ratio: 16 / 9;
  background: var(--placeholder);
}
.strip__img {
  width: 100%; height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;         /* stop native image drag while grabbing */
}

/* ---------- Slogan sits in the flow, centred ---------- */
.design--scroll .slogan {
  margin: clamp(26px, 4.5vw, 70px) 0 clamp(30px, 5vw, 86px);
  padding-inline: var(--pad-x);
}

/* ---------- Services + about ---------- */
.about { display: grid; gap: clamp(24px, 5vw, 56px); }
.services__item {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
}
.about__text p + p { margin-top: 1.15em; }

/* ---------- Rule + contacts footer ---------- */
.rule {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: clamp(30px, 5.5vw, 68px) 0 clamp(24px, 4.5vw, 52px);
}
.footer-meta { display: grid; gap: clamp(24px, 5vw, 40px) clamp(20px, 5vw, 36px); }
/* v2 inverts the contact colours: muted label, ink value */
.design--scroll .meta__label { color: var(--muted); font-weight: 400; }
.design--scroll .meta__value { color: var(--ink); }
.design--scroll .link { color: var(--ink); }
.design--scroll .link:hover { color: var(--muted); }

@media (min-width: 900px) {
  .design--scroll .slogan__svg { width: min(42%, 800px); }
  .about {
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(30px, 7vw, 120px);
  }
  .services { display: flex; flex-direction: column; }
  .services__item { text-transform: uppercase; font-size: clamp(20px, 1.7vw, 30px); }
  .about__text { font-size: clamp(15px, 1.05vw, 17px); line-height: 1.45; }
  .footer-meta { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 899px) {
  .strip__item { width: 100vw; aspect-ratio: 16 / 9; }
  .design--scroll .slogan__svg { width: min(78%, 340px); }
  .rule { display: none; }              /* the mobile design has no divider */
  .services {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    justify-content: start;
    gap: clamp(2px, 1vw, 8px) clamp(20px, 7vw, 44px);
  }
  .services__item { text-transform: lowercase; font-size: clamp(23px, 6.6vw, 32px); }
  .about__text { font-size: clamp(15px, 4.2vw, 18px); line-height: 1.45; }
  .footer-meta { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Scroll design — expandable service blocks + feedback forms
   ============================================================ */

/* Lead paragraph above the blocks */
.about__lead {
  margin-top: clamp(6px, 2vw, 20px);
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.45;
  max-width: 62ch;
}
.about__lead p + p { margin-top: 1em; }

/* ---------- Expandable service blocks (accordion) ---------- */
.acc {
  margin-top: clamp(30px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.acc__item { border-bottom: 1px solid var(--line); }
.acc__h { margin: 0; }
.acc__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font-family: var(--sans);
  padding: clamp(16px, 2.2vw, 26px) 0;
}
.acc__key {
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-size: clamp(24px, 4.2vw, 44px);
  line-height: 1;
}
.acc__icon {
  position: relative;
  flex: 0 0 auto;
  width: clamp(20px, 2vw, 26px);
  height: clamp(20px, 2vw, 26px);
}
.acc__icon::before,
.acc__icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform .35s ease, opacity .35s ease;
}
.acc__icon::before { left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%); }
.acc__icon::after  { top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); }
.acc__item.is-open .acc__icon::after { transform: translateX(-50%) scaleY(0); opacity: 0; }

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s ease;
}
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__panel-in { overflow: hidden; min-height: 0; }
.acc__headline {
  font-weight: 600;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 40ch;
  padding-top: 2px;
}
.acc__body {
  margin-top: clamp(10px, 1.1vw, 16px);
  padding-bottom: clamp(22px, 2.6vw, 34px);
  color: var(--ink);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.5;
  max-width: 60ch;
}
.acc__head:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (hover: hover) {
  .acc__head:hover .acc__key { opacity: .62; transition: opacity .2s ease; }
}

/* ---------- Feedback forms ---------- */
.form-block { margin-top: clamp(48px, 8vw, 120px); }
.form-block__title {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-transform: uppercase;
  font-size: clamp(30px, 5.2vw, 60px);
}
.form-block__intro {
  margin-top: clamp(14px, 1.6vw, 22px);
  max-width: 52ch;
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.5;
}
.form-block__intro strong { font-weight: 800; }

.pform { margin-top: clamp(24px, 3vw, 40px); }
.pform__grid { display: grid; grid-template-columns: 1fr; gap: clamp(18px, 2.2vw, 28px); }
@media (min-width: 720px) { .pform__grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-top: clamp(18px, 2.2vw, 28px); }
.pform__grid .field { margin-top: 0; }
.field__label {
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  border-radius: 0;
  transition: border-color .2s ease;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--ink); }

.pform__foot {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: clamp(24px, 3vw, 36px);
}
.btn {
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 13px 34px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pform__status { font-size: 14px; color: var(--muted); margin: 0; }
.pform__status.is-ok { color: var(--ink); }
.pform__status.is-err { color: #b23b3b; }
.pform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pform.is-sent { display: none; }
.form-block__done {
  margin-top: clamp(24px, 3vw, 40px);
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 26px);
  letter-spacing: -0.01em;
}

/* ============================================================
   Motion / theme preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .showcase__slide { transition: none !important; }
  .link { transition: none; }
  html { scroll-behavior: auto; }
}
