/* ==========================================================================
   TimeNest — fundația vizuală comună (site public + panou admin)
   Tema „Timp + Natură”: alb clasic, verde mentă, verde natural și maro de cuib.
   Fonturi găzduite local (fără cereri către CDN-uri externe).
   ========================================================================== */

/* Logotip: „Time” — script cu bucle (fără diacritice) */
@font-face {
  font-family: "Monsieur La Doulaise";
  src: url("../fonts/doulaise-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Logotip: „NEST” — capitale romane decorative */
@font-face {
  font-family: "Cinzel Decorative";
  src: url("../fonts/cinzel-deco-latin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cinzel Decorative";
  src: url("../fonts/cinzel-deco-latin-ext-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Titluri: EB Garamond — diacritice românești corecte (ș, ț, â, î, ă) */
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-latin-normal.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-latin-ext-normal.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-latin-italic.woff2") format("woff2");
  font-weight: 400 800; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-latin-ext-italic.woff2") format("woff2");
  font-weight: 400 800; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Text: Figtree */
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-normal.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-ext-normal.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Scris de mână: Caveat (Nesty, adnotări) */
@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Paleta „Timp + Natură” */
  --white: #FFFFFF;
  --paper: #FCFDFA;          /* fundal principal: alb clasic, cu o umbră de verde */
  --linen: #F5F2EA;          /* neutru cald, natural */
  --mist: #EDF7F1;           /* spălat de mentă */
  --mint-soft: #DDF2E6;
  --mint: #A3DEC2;
  --mint-strong: #6CCB9D;    /* verde mentă vibrant (umpleri, accente mari) */
  --leaf-light: #3E8A62;
  --leaf: #2F7350;           /* verde natural — butoane (text alb 5.7:1) */
  --leaf-deep: #24603F;      /* text verde pe alb (7.2:1) */
  --forest: #183A2A;         /* verde de pădure — text și secțiuni închise (12.5:1) */
  --forest-700: #22503A;
  --forest-900: #10291D;
  --moss: #7C9468;
  --bark: #6B4A2E;           /* maro de scoarță — text (7.9:1) */
  --twig: #A07A52;           /* crenguțe, cuib */
  --straw: #D9C49C;
  --sand: #ECE3D0;

  /* Roluri */
  --bg: var(--paper);
  --text: var(--forest);
  --text-soft: #4A5E52;      /* 7.0:1 pe alb */
  --text-faint: #66776C;     /* 4.8:1 pe alb */
  --line: rgba(24, 58, 42, .13);
  --line-strong: rgba(24, 58, 42, .28);
  --success: #2F7350;
  --success-bg: #E1F3E8;
  --danger: #A23A2C;
  --danger-bg: #F8E3DE;
  --warning: #7A5A12;
  --warning-bg: #F6EDD3;
  --info: #2D5A7A;
  --info-bg: #E0ECF2;

  --font-serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --font-display: "Cinzel Decorative", "EB Garamond", Georgia, serif;
  --font-script: "Monsieur La Doulaise", "Brush Script MT", cursive;
  --font-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Folie de jad pentru titluri de lux */
  --jade: linear-gradient(118deg, #10291D 0%, #24603F 26%, #7FD3AA 44%, #E7F7EE 50%, #6CCB9D 56%, #24603F 72%, #10291D 100%);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 26px;
  --blob: 62% 38% 55% 45% / 48% 58% 42% 52%;
  --shadow-sm: 0 1px 2px rgba(24, 58, 42, .06), 0 3px 10px rgba(24, 58, 42, .05);
  --shadow: 0 2px 4px rgba(24, 58, 42, .05), 0 16px 36px -12px rgba(24, 58, 42, .22);
  --shadow-lg: 0 6px 12px rgba(24, 58, 42, .06), 0 34px 70px -24px rgba(24, 58, 42, .34);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);

  /* Granulație fină de hârtie (SVG turbulence, inline) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .3 0 0 0 0 .22 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-serif); font-weight: 500; line-height: 1.14; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--mint); color: var(--forest-900); }

:focus-visible { outline: 2.5px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--forest); color: var(--white); padding: .7em 1.1em; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Butoane ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--forest); --btn-border: transparent;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: .85em 1.6em;
  border-radius: 999px; border: 1.5px solid var(--btn-border);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem; line-height: 1.1; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease),
              box-shadow .25s var(--ease), transform .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
/* luciu care trece peste buton la hover */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { box-shadow: 0 10px 22px -10px rgba(24, 58, 42, .55); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: none; }
.btn--primary { --btn-bg: var(--forest); --btn-fg: var(--white); }
.btn--primary:hover { --btn-bg: var(--forest-900); }
.btn--accent { --btn-bg: var(--leaf); --btn-fg: var(--white); }
.btn--accent:hover { --btn-bg: var(--leaf-deep); }
.btn--mint { --btn-bg: var(--mint); --btn-fg: var(--forest-900); }
.btn--mint:hover { --btn-bg: var(--mint-strong); }
.btn--ghost { --btn-border: var(--line-strong); --btn-fg: var(--forest); --btn-bg: rgba(255, 255, 255, .6); }
.btn--ghost:hover { --btn-bg: var(--white); --btn-border: var(--forest); box-shadow: none; }
.btn--light { --btn-bg: var(--white); --btn-fg: var(--forest); }
.btn--small { min-height: 40px; padding: .55em 1.1em; font-size: .9rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn[disabled]::after { display: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn .btn__icon { width: 1.15em; height: 1.15em; flex: none; }
.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; }
.btn--danger:hover { --btn-bg: #862C20; }

.spinner {
  width: 1.05em; height: 1.05em; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Câmpuri de formular ---------- */
.field { display: grid; gap: .4rem; }
.field__label { font-weight: 600; font-size: .95rem; color: var(--forest); }
.field__label .optional { font-weight: 400; color: var(--text-faint); font-size: .88em; }
.field__hint { font-size: .86rem; color: var(--text-faint); }
.field__error { font-size: .88rem; color: var(--danger); font-weight: 500; display: flex; gap: .35em; align-items: flex-start; }
.field__error:empty { display: none; }
.input, .select, .textarea {
  width: 100%; min-height: 50px;
  padding: .75em 1em;
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  color: var(--forest);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.6em; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23183A2A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9em center; background-size: 1.1em;
}
.input::placeholder, .textarea::placeholder { color: #8B998F; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--leaf); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--leaf); background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 203, 157, .28);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--danger); background: #FFFBFA;
}
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(162, 58, 44, .15); }

.checkbox { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; cursor: pointer; }
.checkbox input {
  appearance: none; -webkit-appearance: none; margin: .15em 0 0;
  width: 1.35rem; height: 1.35rem; border-radius: 6px;
  border: 1.5px solid var(--line-strong); background: var(--white);
  display: grid; place-content: center; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.checkbox input::after {
  content: ""; width: .7rem; height: .4rem; border: 2px solid #fff; border-top: 0; border-right: 0;
  transform: rotate(-45deg) scale(0); margin-top: -.15rem; transition: transform .2s var(--spring);
}
.checkbox input:checked { background: var(--leaf); border-color: var(--leaf); }
.checkbox input:checked::after { transform: rotate(-45deg) scale(1); }
.checkbox input[aria-invalid="true"] { border-color: var(--danger); }
.checkbox input:focus-visible { outline: 2.5px solid var(--leaf); outline-offset: 2px; }
.checkbox__text { font-size: .93rem; color: var(--text-soft); }
.checkbox__text a { color: var(--leaf-deep); font-weight: 600; }

/* ---------- Mesaje de stare ---------- */
.notice {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .9rem 1.1rem; border-radius: var(--radius);
  font-size: .95rem; line-height: 1.5;
  border: 1px solid transparent;
}
.notice svg { width: 1.25rem; height: 1.25rem; flex: none; margin-top: .1rem; }
.notice--error { background: var(--danger-bg); color: #6E2318; border-color: rgba(162, 58, 44, .25); }
.notice--success { background: var(--success-bg); color: #1F4A36; border-color: rgba(47, 115, 80, .25); }
.notice--info { background: var(--info-bg); color: #1F3F56; border-color: rgba(45, 90, 122, .2); }
.notice--warning { background: var(--warning-bg); color: #5A420C; border-color: rgba(122, 90, 18, .25); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
