/* ==========================================================================
   PLAST ENERGY — base.css
   Reset, design tokens, typography, utilities.
   Ύφος: editorial / light. Θερμό χαρτί, σερίφ τίτλοι, λεπτές γραμμές.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body,
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
}

ul[class], ol[class] {
  padding: 0;
  list-style: none;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

a { color: inherit; }

/* --- Design tokens ------------------------------------------------------- */

:root {
  /* Χρώματα — θερμή, ήπια παλέτα */
  --paper:        #fbfaf7;
  --paper-sunk:   #f5f2ec;
  --paper-raised: #ffffff;
  --ink:          #22262b;
  --ink-soft:     #565d66;
  --ink-faint:    #8b9199;
  --accent:       #a9743a;
  --accent-deep:  #8a5d2c;
  --accent-wash:  #f3ece2;
  --rule:         #e6e2da;
  --rule-strong:  #d4cec2;

  /* Τυπογραφία */
  --font-display: "EB Garamond", "Georgia", "Times New Roman", "Palatino Linotype", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);
  --step-0:  clamp(1.00rem, 0.97rem + 0.16vw, 1.09rem);
  --step-1:  clamp(1.19rem, 1.12rem + 0.34vw, 1.40rem);
  --step-2:  clamp(1.45rem, 1.32rem + 0.64vw, 1.85rem);
  --step-3:  clamp(1.80rem, 1.55rem + 1.22vw, 2.55rem);
  --step-4:  clamp(2.20rem, 1.72rem + 2.38vw, 3.75rem);

  /* Ρυθμός & γεωμετρία */
  --measure:    68ch;
  --shell:      1140px;
  --shell-tight: 780px;
  --gutter:     clamp(1.25rem, 4vw, 3rem);
  --section-y:  clamp(4.5rem, 9vw, 8.5rem);
  --radius:     2px;

  /* Κινήσεις — αργές και διακριτικές */
  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast:     180ms;
  --t-base:     320ms;
  --t-slow:     700ms;
}

/* --- Σκελετός ------------------------------------------------------------ */

html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

/* Κλείδωμα του scroll όταν είναι ανοιχτό το κινητό μενού */
body.is-locked { overflow: hidden; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.3; }

p { max-width: var(--measure); }

strong { font-weight: 600; }

/* --- Utilities ----------------------------------------------------------- */

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

.shell--tight { max-width: var(--shell-tight); }

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

/* Ώστε η sticky κεφαλίδα να μην καλύπτει τον τίτλο μετά από κλικ σε άγκυρα. */
:target,
[id] { scroll-margin-top: 96px; }

.rule {
  height: 1px;
  border: 0;
  background-color: var(--rule);
}

/* Μικρό κεφαλαίο label πάνω από τους τίτλους */
.eyebrow {
  display: block;
  margin-bottom: 1.15rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

/* --- Προσβασιμότητα ------------------------------------------------------ */

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

.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 200;
  padding: 0.7rem 1.4rem;
  transform: translate(-50%, -140%);
  background-color: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease);
}

.skip-link:focus-visible { transform: translate(-50%, 0); }

/* --- Αποκάλυψη στο scroll ------------------------------------------------ */

/* Το αρχικό κρύψιμο εφαρμόζεται μόνο όταν η JS είναι ενεργή (η κλάση .js
   προστίθεται από inline script στο <head>), ώστε χωρίς JS να μην χαθεί
   περιεχόμενο και να μην υπάρχει αναλαμπή στο φόρτωμα. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal {
  transition:
    opacity var(--t-slow) var(--ease),
    transform var(--t-slow) var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Σεβασμός στις προτιμήσεις κίνησης ----------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
