/* ══════════════════════════════════════════════════════════════════════════════
   IKTEN · «ΖΩΝΤΑΝΗ» ΣΕΛΙΔΑ · το φωτογραφικό στρώμα και οι διορθώσεις του κινητού.
   Φορτώνεται τελευταίο. Δεν αλλάζει γράμματα, αριθμούς, σειρά ενοτήτων.
   Κανόνες: μόνο transform / opacity στην κίνηση · καμία εξωτερική πηγή.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 0 · πιο παλιά iPhone: πρώτα hidden, μετά clip ─────────────────────────── */
body { overflow-x: hidden; overflow-x: clip; }

/* ── 1 · το φωτογραφικό πλαίσιο ──────────────────────────────────────────────
   photos 29/11: a band at the end of its section, full-bleed, never taller than about a third of the window on a
   screen wider than a phone (the page was 21 screens at 1440x900 with 21/9 bands, it is about 17 now). Each picture
   has its own height (--ph-v, in % of the window height) and its own crop (object-position), set per section in 1b.
   A gap above it, so nothing of the section (the black bar of «22» in #synergatis) stands on its top edge. */
.ph {
  position: relative;
  margin: 0;
  max-width: none;                        /* a section may cap its children (.sec-sxedia > * at 1840 px) */
  margin-top: clamp(18px, 2.8vh, 34px);
  margin-inline: calc(0px - max(var(--pad, 16px), calc((100vw - var(--page-max, 1840px)) / 2)));
  margin-bottom: calc(0px - clamp(40px, 7vh, 80px));
  background: var(--ink);
  overflow: hidden;
  aspect-ratio: 5 / 3;                    /* a phone upright (Higgsfield: 3/2; a little lower, for the gap above) */
  isolation: isolate;
}
@media (min-width: 701px) {
  /* wider than a phone: the window decides the height (a band, not a poster), with a floor and a ceiling */
  .ph {
    aspect-ratio: auto;
    height: clamp(170px, min(calc(100vw / 2.4), calc(var(--ph-v, 28) * 1vh)), 560px);
    height: clamp(170px, min(calc(100vw / 2.4), calc(var(--ph-v, 28) * 1svh)), 560px);
  }
}
.ph picture, .ph img { display: block; width: 100%; height: 100%; }
.ph img {
  object-fit: cover;
  object-position: var(--ph-x, 50%) var(--ph-y, 50%);
  backface-visibility: hidden;
}
html.js .ph img { opacity: 0; transform: scale(1.07); transition: opacity 900ms ease, transform 1700ms var(--out); }
html.js .ph.is-in img { opacity: 1; transform: scale(1); }
.ph::after {                      /* a hairline of ink at the seam */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(19, 19, 19, .55);
}
@media (prefers-reduced-motion: reduce) {
  html.js .ph img { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── 1b · each picture: its height on a wide screen and its crop (faces and machines stay in the frame) ──────
   --ph-v: height in % of the window (wider than 700 px) · --ph-y / --ph-x: the crop, on the phone (3:2) and wide */
#hero .ph       { --ph-v: 30; --ph-y: 46%; }    /* the excavator's cab and the contractor's helmet */
#othoni .ph     { --ph-v: 26; --ph-y: 50%; }    /* the drawings on the wall, the window, the desk */
#koumpia .ph    { --ph-v: 24; --ph-y: 62%; }    /* the levers and the window */
#synergatis .ph { --ph-v: 32; --ph-y: 26%; }    /* her face */
#gnosi .ph      { --ph-v: 24; --ph-y: 40%; }    /* the shelves */
#xartia .ph     { --ph-v: 24; --ph-y: 50%; }    /* the lamp and the stacks */
#sxedia .ph     { --ph-v: 28; --ph-y: 56%; }    /* the gabion wall and the bucket */
#elegxos .ph    { --ph-v: 28; --ph-y: 56%; }    /* the stamp on the paper */
#erotiseis .ph  { --ph-v: 34; --ph-y: 30%; }    /* his face */
@media (min-width: 701px) {
  #hero .ph       { --ph-y: 40%; }
  #othoni .ph     { --ph-y: 36%; }
  #koumpia .ph    { --ph-y: 58%; }
  #synergatis .ph { --ph-y: 37%; }
  #gnosi .ph      { --ph-y: 46%; }
  #xartia .ph     { --ph-y: 46%; }
  #sxedia .ph     { --ph-y: 52%; }
  #elegxos .ph    { --ph-y: 53%; }
  #erotiseis .ph  { --ph-y: 34%; }
}

/* ── 1c · «ΤΙΜΙΕΣ ΑΠΑΝΤΗΣΕΙΣ» on a wide screen: the contractor beside the questions, under the title, not a band ── */
@media (min-width: 1101px) {
  .ero-in { grid-template-rows: auto minmax(0, 1fr); }
  .ero-in > .ero-list { grid-row: 1 / span 2; }
  .ero-in > .ph {
    grid-column: 1 / span 4; grid-row: 2; align-self: start;
    position: -webkit-sticky; position: sticky; top: calc(var(--top-h) + 24px);
    margin: clamp(26px, 4vh, 44px) 0 0; height: auto; aspect-ratio: 4 / 5; max-height: 56vh; max-height: 56svh;
    border-radius: 3px;
  }
  .ero-in > .ero-h { position: static; }
  #erotiseis .ph { --ph-y: 22%; }
}

/* ── 2 · η πρώτη οθόνη: η φωτογραφία της αρχής ───────────────────────────────
   photos 29/11: on a desktop the picture is a band across the top of the hero, above the headline and the console
   (before, it sat behind the console and only a sliver showed). The headline and the console give up a little size
   to it, so both stay whole in the first screen. Under 1101 px the strip of 13 does the same job. */
.hero { position: relative; isolation: isolate; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 74% 46%;
  transform: scale(1.03);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--paper) 0%, var(--paper) 27%, rgba(245,243,237,.96) 38%,
                    rgba(245,243,237,.62) 50%, rgba(245,243,237,.18) 66%, rgba(245,243,237,0) 80%),
    linear-gradient(180deg, rgba(245,243,237,.85) 0%, rgba(245,243,237,0) 22%);
}
.hero > .hero__copy, .hero > .console { position: relative; z-index: 1; }
@media (max-width: 1100px) { .hero__bg { display: none; } }
@media (min-width: 1100px) { .hero { padding-top: 34px; } }      /* Higgsfield; the band below overrides it */
@media (min-width: 1101px) and (min-height: 650px) {
  .hero {
    --band: clamp(56px, calc(9vh), 76px);
    --band: clamp(56px, calc(9svh), 76px);
    padding-top: calc(var(--band) + 12px); padding-bottom: 20px;
  }
  .hero__bg { inset: 0 0 auto 0; height: calc(var(--band) + 26px); }
  .hero__bg img { object-position: 50% 32%; }
  .hero__bg::after {
    background: linear-gradient(180deg, rgba(245,243,237,0) 0%, rgba(245,243,237,0) calc(100% - 46px),
                                rgba(245,243,237,.86) calc(100% - 10px), var(--paper) 100%);
  }
}
@media (min-width: 1101px) and (min-height: 821px) {
  /* a desktop window: a real band (126 px at 900 tall); the console and the headline give up about 8 % */
  .hero {
    --band: clamp(64px, calc(15.5vh - 14px), 220px);
    --band: clamp(64px, calc(15.5svh - 14px), 220px);
    padding-top: calc(var(--band) + 22px); padding-bottom: 22px;
  }
  .hero__bg { height: calc(var(--band) + 34px); }
  .hero__bg::after {
    background: linear-gradient(180deg, rgba(245,243,237,0) 0%, rgba(245,243,237,0) calc(100% - 58px),
                                rgba(245,243,237,.86) calc(100% - 14px), var(--paper) 100%);
  }
  .mega { font-size: clamp(58px, min(8.6vw, calc((100vh - var(--top-h) - var(--band) - 262px) / 4.1)), 172px);
          font-size: clamp(58px, min(8.6vw, calc((100svh - var(--top-h) - var(--band) - 262px) / 4.1)), 172px); }
  .console {
    width: min(100%, calc((100vh - var(--top-h) - var(--band) - 246px) * 1.636 + 38px));
    width: min(100%, calc((100svh - var(--top-h) - var(--band) - 246px) * 1.636 + 38px));
  }
}
@media (min-width: 1101px) and (min-height: 650px) and (max-height: 820px) {
  /* a short laptop window (1280 x 720, 1366 x 768, 1536 x 730; under 650 px tall: no band, as before): a thin band; the console keeps its width wherever
     the window allows it (the captions beside the keys must stay on two lines), the headline gives up about 5 % */
  .mega { font-size: clamp(58px, min(8.6vw, calc((100vh - var(--top-h) - var(--band) - 190px) / 4.1)), 172px);
          font-size: clamp(58px, min(8.6vw, calc((100svh - var(--top-h) - var(--band) - 190px) / 4.1)), 172px); }
  .console {
    width: min(58vw, calc((100vh - var(--top-h) - var(--band) - 150px) * 1.636 + 38px));
    width: min(58vw, calc((100svh - var(--top-h) - var(--band) - 150px) * 1.636 + 38px));
  }
}

/* ── 3 · το κλείσιμο: ανατολή ──────────────────────────────────────────────── */
.outro { position: relative; isolation: isolate; }
.outro__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.outro__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 42%; opacity: .55; }
.outro__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,17,16,.78) 0%, rgba(17,17,16,.84) 55%, rgba(17,17,16,.96) 100%);
}
.outro > *:not(.outro__bg) { position: relative; z-index: 1; }

/* ── 4 · κινητό: η πρόταση στηn πρώτη οθόνη ───────────────────────────────── */
@media (max-width: 700px) {
  .hero { padding-top: 16px; }
  .hero__copy { display: contents; }
  .hero__copy > h1 { order: 0; }
  .hero__sub { order: 1; margin-top: 10px; font-size: 15px; line-height: 1.42; }
  .hero__cta { order: 2; margin-top: 12px; }
  .console { order: 3; }
  .mega { font-size: clamp(44px, 13.6vw, 58px); }
  .hero__sub { max-width: none; }
}

/* ── 5 · 44 px: ό,τι πατιέται ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .menu__k, .menu__login, .top__login { min-height: 44px; align-items: center; }
  .wall .sel, .sel { min-height: 44px; }
  .stage__more, .wall__more { min-height: 44px; }
  .ik-elg__perissotera, .ele-fk-make, .ik-linklike { min-height: 44px; display: inline-flex; align-items: center; }
  .oth-more, .know__more, .xar-more { min-height: 44px; display: inline-flex; align-items: center; }
  .ik-btn, .ik-btn--small, .ik-btn--ghost { min-height: 44px; }
  .ero-sum { min-height: 56px; }
}

/* ── 6 · «ΕΣΥ ΕΛΕΓΧΕΙΣ»: η τέταρτη καρτέλα δεν κρύβεται χωρίς σημάδι ──────── */
#elegxos .ik-karteles {
  position: relative; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
}
#elegxos .ik-karteles::-webkit-scrollbar { display: none; }
#elegxos .ik-karteles::after {
  content: ""; position: sticky; right: 0; flex: 0 0 30px; margin-left: -30px; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff 85%);
}

/* ── 7 · «ΟΛΟ ΤΟ ΕΡΓΟ»: χωρίς καρφίτσωμα στο κινητό ───────────────────────── */
@media (max-width: 900px) {
  .sec-othoni.is-stick .oth-stage { position: static; }
  .oth-plate { padding: 8px 6px 10px; }
}

/* ── 8 · Ο ΝΟΜΟΣ: πιο κοντός τίτλος στο κινητό ────────────────────────────── */
@media (max-width: 700px) {
  h2.big { font-size: clamp(34px, 9.2vw, 46px); line-height: .9; }
  h2.outro__h { font-size: clamp(40px, 11vw, 62px); }
}

/* ── 9 · το φίλτρο των 63 κουμπιών: καθαρή αναδίπλωση ─────────────────────── */
@media (max-width: 700px) {
  .selector { display: flex; flex-wrap: wrap; gap: 8px; }
  .selector .sel { flex: 0 1 auto; height: 44px; }
  .selector__say { flex: 1 1 100%; }
}

/* ── 10 · ο διακόπτης των ελέγχων: να μη χοροπηδά ─────────────────────────── */
.ele-slide { contain: layout paint; }
.ele-slide__c { transition: color 160ms linear; }
.ele-slide__c span { display: block; }
@media (max-width: 700px) {
  .ele-slide { display: grid; grid-template-columns: repeat(3, 1fr); }
  .ele-slide__c { width: auto; height: 52px; }
}

/* ── 11 · μικρές ανάσες στο κινητό ────────────────────────────────────────── */
@media (max-width: 700px) {
  .sec { padding-top: clamp(44px, 6vh, 64px); }
  .m-head .m-lead { font-size: 16px; }
}

/* ── 12 · λεπτομέρειες ─────────────────────────────────────────────────────── */
#sxe-odo-l .odo__d.is-zero { width: 0 !important; min-width: 0 !important; opacity: 0; overflow: hidden; margin: 0 !important; padding: 0 !important; }
.hero > .ph { grid-column: 1 / -1; order: 9; align-self: start; margin-top: 0; margin-bottom: -24px; }
@media (max-width: 640px) { .hero > .ph { margin-bottom: -20px; } }
@media (prefers-reduced-motion: no-preference) {
  .hero__bg img { animation: heroDrift 38s ease-in-out infinite alternate; }
  .outro__bg img { animation: outroDrift 44s ease-in-out infinite alternate; }
}
@keyframes heroDrift { from { transform: scale(1.03) translate3d(0,0,0) } to { transform: scale(1.1) translate3d(-1.4%,-1.6%,0) } }
@keyframes outroDrift { from { transform: scale(1.02) translate3d(0,0,0) } to { transform: scale(1.08) translate3d(1.2%,-1.2%,0) } }

/* ── 13 · η λωρίδα της ταινίας στην κορυφή, στο κινητό ─────────────────────── */
.hero__strip { display: none; }
@media (max-width: 1100px) {
  .hero__bg { display: none; }
  .hero__strip {
    display: block; grid-column: 1 / -1; order: -1;
    margin-inline: calc(0px - max(var(--pad, 16px), calc((100vw - var(--page-max, 1840px)) / 2)));
    margin-top: calc(0px - var(--hero-pt, 10px));
    margin-bottom: 4px;
    overflow: hidden; background: var(--ink); aspect-ratio: 16 / 5;
  }
  @media (min-width: 701px) {
    /* photos 29/11: a tablet or a small window: a lower strip, so the console still starts in the first screen */
    .hero__strip { aspect-ratio: auto; height: clamp(110px, 17vh, 190px); height: clamp(110px, 17svh, 190px); }
  }
  .hero__strip img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 42%; }
  .hero { --hero-pt: 16px; }
}

/* ── 14 · ο κλειστός δίσκος: διαβάζεται σαν υποδοχή, όχι σαν κενό ─────────── */
.ele-gate[data-state="block"] .ele-bay__well::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,.055), transparent 62%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.022) 0 1px, transparent 1px 7px);
  box-shadow: inset 0 14px 28px -14px #000, inset 0 -34px 44px -34px rgba(0,0,0,.95);
}
/* ── 15 · το κλείσιμο: η φωτογραφία να διαβάζεται ─────────────────────────── */
.outro__bg img { opacity: .78; }
.outro__bg::after {
  background: linear-gradient(180deg, rgba(17,17,16,.74) 0%, rgba(17,17,16,.80) 55%, rgba(17,17,16,.94) 100%);
}

html.js-failed .ph img { opacity: 1 !important; transform: none !important; }
