/* Еңбек (қыз балалар) — «Кесте үлгі» дизайн-жүйесі.
   Тема: рукоделие — кесте, тігіс, аспаздық. Тек осы стендке арналған. */

:root {
  --cream:        #f7ecd6;
  --cream-deep:   #eddcb8;
  --paper:        #fffbf1;
  --paper-line:   #fbf0da;
  --ink:          #3c2a1a;
  --ink-soft:     rgba(60,42,26,.72);
  --ink-faint:    rgba(60,42,26,.5);
  --ink-line:     rgba(60,42,26,.16);
  --ink-line-2:   rgba(60,42,26,.30);

  --terracotta:      #b8482c;
  --terracotta-deep: #8a3520;
  --gold:            #b9852b;
  --gold-bright:     #d9a53f;
  --rose:            #c56a82;
  --rose-deep:       #a14a63;
  --sage:            #748a5c;
  --sage-deep:       #566844;
  --indigo:          #4b5f77;

  --ok:  #5f8a52;
  --bad: #b8482c;

  --card:       var(--paper);
  --card-line:  var(--ink-line);
  --card-hover: var(--paper-line);

  --f-serif: 'Lora', 'PT Serif', Georgia, serif;
  --f-hand:  'Caveat', cursive;
  --f-sans:  'PT Sans', system-ui, -apple-system, sans-serif;

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px;
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px;
  --tap: 44px;
  --dur-1: 160ms; --dur-2: 320ms;
  --ease: cubic-bezier(.22,.8,.32,1);
  --nav-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(60,42,26,.07) 1px, transparent 0);
  background-size: 16px 16px;
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16.5px; line-height: 1.62;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
}
/* soft linen weave overlay */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    repeating-linear-gradient(0deg, rgba(60,42,26,.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(60,42,26,.025) 0 1px, transparent 1px 3px);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

main { position: relative; z-index: 1; }

/* ---------- Top brand strip ---------- */
.topstrip {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: max(env(safe-area-inset-top,0px), var(--s3)) var(--s4) var(--s3);
  border-bottom: 2px dashed var(--ink-line-2);
  background: linear-gradient(180deg, var(--cream-deep), var(--cream) 90%);
}
.topstrip .brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; min-height: var(--tap); }
.topstrip .brand img { width: 84px; height: 30px; display: block; }
.topstrip .brand-site { font-family: var(--f-sans); font-size: .72rem; font-weight: 700; color: var(--terracotta-deep); letter-spacing: .02em; line-height: 1.25; }
.topstrip .all-stands {
  font-family: var(--f-sans); font-size: .74rem; font-weight: 700; color: var(--ink-soft);
  text-decoration: none; border: 1.5px solid var(--ink-line-2); border-radius: 100px;
  padding: var(--s2) var(--s4); min-height: 36px; display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--dur-1) var(--ease);
}
.topstrip .all-stands:hover { background: var(--paper); border-color: var(--terracotta); color: var(--terracotta-deep); }

/* ---------- Hero ---------- */
.hero { padding: var(--s7) var(--s5) var(--s6); text-align: center; position: relative; }
.hero-motif { width: 64px; margin: 0 auto var(--s4); opacity: 0; animation: fadeUp .7s var(--ease) .05s forwards; }
.hero-motif svg { width: 100%; height: auto; }
.hero-motif path { fill: none; stroke: var(--terracotta); stroke-width: 2; stroke-linecap: round; }
.hero-eyebrow {
  font-family: var(--f-hand); font-weight: 700; color: var(--rose-deep); font-size: 1.5rem;
  margin-bottom: var(--s1); opacity: 0; animation: fadeUp .7s var(--ease) .15s forwards;
}
.hero-title {
  font-family: var(--f-serif); font-weight: 700; color: var(--ink);
  font-size: clamp(2.3rem, 9vw, 3.6rem); line-height: 1.08; margin-bottom: var(--s3);
  opacity: 0; animation: fadeUp .8s var(--ease) .22s forwards;
}
.hero-title em { font-style: normal; color: var(--terracotta); }
.hero-sub {
  color: var(--ink-soft); font-size: 1.05rem; max-width: 40ch; margin: 0 auto;
  opacity: 0; animation: fadeUp .8s var(--ease) .3s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* stitched divider */
.stitch-divider { height: 18px; margin: 0 auto; max-width: 720px; }
.stitch-divider svg { width: 100%; height: 100%; }

section { padding: var(--s5) var(--s4); max-width: 780px; margin: 0 auto; }
.section-header { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s2); }
.section-title { font-family: var(--f-serif); font-size: 1.5rem; font-weight: 700; color: var(--terracotta-deep); }
.section-note { font-family: var(--f-hand); font-size: 1.15rem; color: var(--rose-deep); }
.section-desc { color: var(--ink-soft); font-size: .95rem; margin-bottom: var(--s4); max-width: 60ch; }

/* ---------- Cards / tags ---------- */
.card {
  background: var(--card); border: 1.5px solid var(--card-line); border-radius: var(--r-lg);
  padding: var(--s5); transition: all var(--dur-2) var(--ease);
  box-shadow: 0 1px 0 rgba(60,42,26,.04);
}
.card:hover { border-color: var(--gold); background: var(--card-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(60,42,26,.1); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px;
  background: rgba(184,72,44,.09); border: 1px solid rgba(184,72,44,.28); border-radius: 100px;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--terracotta-deep);
}

/* ---------- Grids ---------- */
.grid-2 { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: var(--s3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s5); border-radius: var(--r-md);
  font-family: var(--f-sans); font-weight: 700; font-size: .96rem; cursor: pointer;
  border: none; text-decoration: none; transition: all var(--dur-1) var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--terracotta); color: var(--paper); }
.btn-primary:hover { background: var(--terracotta-deep); }
.btn-primary:disabled { opacity: .45; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink-line-2); }
.btn-ghost:hover { background: var(--paper); border-color: var(--terracotta); }
.btn-gold { background: var(--gold); color: var(--paper); }
.btn-gold:hover { background: var(--gold-bright); }
.btn-sm { min-height: 38px; padding: 0 var(--s4); font-size: .85rem; border-radius: 100px; }

/* ---------- Safety notice (fabric tag pinned) ---------- */
.notice {
  position: relative; background: #fff7e4; border: 1.5px dashed var(--terracotta);
  border-radius: var(--r-lg); padding: var(--s5) var(--s5) var(--s5) var(--s6);
}
.notice::before {
  content: '📌'; position: absolute; top: -14px; left: 22px; font-size: 1.4rem;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
}
.notice h3 { font-family: var(--f-serif); font-size: 1.15rem; color: var(--terracotta-deep); margin-bottom: var(--s3); }
.notice ul { list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
.notice li { position: relative; padding-left: var(--s5); font-size: .93rem; color: var(--ink-soft); line-height: 1.5; }
.notice li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--sage-deep); font-weight: 700; }

/* ---------- Quote card ---------- */
.quote-card {
  max-width: 620px; margin: var(--s6) auto 0; background: var(--paper);
  border: 1.5px solid var(--ink-line-2); border-radius: var(--r-xl);
  padding: var(--s6) var(--s5); text-align: center; position: relative;
}
.quote-text { font-family: var(--f-hand); font-size: 1.7rem; color: var(--ink); line-height: 1.35; margin-bottom: var(--s2); }
.quote-author { font-family: var(--f-sans); font-weight: 700; color: var(--rose-deep); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Footer card ---------- */
.foot-card {
  max-width: 780px; margin: var(--s7) auto var(--s5); padding: var(--s6) var(--s5);
  text-align: center; border-top: 2px dashed var(--ink-line-2);
}
.foot-card img { width: 130px; height: 46px; margin: 0 auto var(--s3); }
.foot-card .site { font-size: .85rem; color: var(--ink-soft); margin-bottom: var(--s1); }
.foot-card .copy { font-size: .74rem; color: var(--ink-faint); }

/* ---------- Bottom nav (stitched ribbon) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: var(--paper);
  border-top: 2px dashed var(--terracotta);
  box-shadow: 0 -6px 18px rgba(60,42,26,.1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--tap); padding: var(--s2) 2px; text-decoration: none; color: var(--ink-faint);
  font-size: .65rem; font-weight: 700; letter-spacing: .01em; position: relative;
  transition: color var(--dur-1) var(--ease);
}
.nav-item span { line-height: 1.1; }
.nav-item:hover { color: var(--ink); }
.nav-item[aria-current="page"] { color: var(--terracotta-deep); }
.nav-item[aria-current="page"]::before {
  content: ''; position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; background: var(--terracotta); border-radius: 100px;
}
.nav-icon { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-motif, .hero-eyebrow, .hero-title, .hero-sub { opacity: 1 !important; transform: none !important; }
}
:focus-visible { outline: 2.5px solid var(--terracotta); outline-offset: 2px; border-radius: 4px; }

@media (min-width: 900px) {
  body { font-size: 17px; }
  section { padding: var(--s6) var(--s4); }
}
