/* ============================================================
   styles.css — sketchnote.trammb.com
   Style: nền giấy kem + mực teal, minh hoạ line-art một màu,
   tiêu đề chữ viết tay, nav chữ in hoa giãn chữ.
   Mobile-first.
   ============================================================ */

/* ---------- 1. Màu & font ---------- */
:root {
  --ink:        #0E5A66;   /* mực teal đậm — màu chủ đạo */
  --ink-deep:   #09424B;
  --ink-soft:   #487176;   /* chữ đoạn văn — đủ tương phản WCAG AA trên nền kem */
  --sky:        #A9CBD1;   /* teal nhạt — nút phụ, nhấn */
  --sky-soft:   #D6E7EA;
  --paper:      #F8EFE9;   /* giấy kem */
  --paper-2:    #FBF5F1;
  --white:      #FFFFFF;
  --line:       #E3D5CC;

  --font-hand: "Dancing Script", "Segoe Script", cursive;
  --font-body: "Mulish", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --r-md: 16px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 9999px;
  --shadow: 0 12px 34px rgba(14,90,102,.10);
  --wrap: 1140px;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.7;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ink); }

/* Tiêu đề lớn = chữ viết tay */
.display {
  font-family: var(--font-hand); font-weight: 700;
  color: var(--ink); line-height: 1.18; letter-spacing: 0;
  margin: 0 0 .3em;
}
h1.display { font-size: clamp(2.2rem, 8.5vw, 3.9rem); }
h2.display { font-size: clamp(1.8rem, 6.5vw, 2.9rem); }
h3 { font-family: var(--font-body); font-weight: 800; font-size: 1.1rem; color: var(--ink); margin: 0 0 .4em; line-height: 1.35; }
h4 { font-weight: 800; font-size: .95rem; color: var(--ink); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
strong { color: var(--ink); font-weight: 800; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.section { padding: 3.5rem 0; }
.center { text-align: center; }
.lead { font-size: 1.05rem; max-width: 56ch; }
.center .lead, .lead.center { margin-inline: auto; }

/* Nhãn nhỏ chữ in hoa giãn chữ */
.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink);
  margin-bottom: .7rem;
}

/* ---------- 3. Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-size: .82rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 1em 2em; border: 2px solid var(--ink); background: var(--ink); color: #fff;
  text-decoration: none; cursor: pointer; border-radius: 2px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover, .btn:focus-visible { background: var(--ink-deep); border-color: var(--ink-deep); }
.btn--sky { background: var(--sky); border-color: var(--sky); color: var(--ink); }
.btn--sky:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--sm { padding: .7em 1.4em; font-size: .74rem; }
.btn--text {
  background: none; border: 0; padding: 0; color: var(--ink);
  letter-spacing: .12em; border-bottom: 2px solid var(--sky); border-radius: 0;
}
.btn--text:hover { background: none; border-bottom-color: var(--ink); }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(248,239,233,.96);
  backdrop-filter: saturate(180%) blur(8px);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; }

/* Logo xếp 3 dòng như bảng hiệu */
.logo { text-align: center; text-decoration: none; color: var(--ink); line-height: 1.1; }
.logo .top, .logo .bottom {
  display: block; font-size: .6rem; font-weight: 800; letter-spacing: .34em; text-transform: uppercase;
}
.logo .mid {
  display: block; font-size: 1.22rem; font-weight: 900; letter-spacing: .1em;
  text-transform: uppercase; margin: .1em 0;
}

.nav-toggle {
  display: grid; gap: 5px; width: 42px; height: 40px; place-content: center;
  background: none; border: 1.5px solid var(--ink); border-radius: 4px; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); }

/* Trên điện thoại: 2 nhóm link xếp dọc dưới logo, không đè lên nhau */
.nav { flex-wrap: wrap; }
.nav-links {
  display: none; list-style: none; margin: 0; padding: 0;
  width: 100%; flex-direction: column; gap: 0;
}
.nav-links--left  { order: 3; }
.nav-links--right { order: 4; padding-bottom: .8rem; }
.nav-links.open { display: flex; }
.nav-links a {
  display: block; padding: .75rem .1rem; color: var(--ink); text-decoration: none;
  font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.nav-links a.is-active { border-bottom-color: var(--ink); }

@media (min-width: 1000px) {
  .nav-toggle { display: none; }
  .nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .nav-links {
    display: flex; flex-direction: row; align-items: center; gap: 2rem;
    position: static; background: none; padding: 0; box-shadow: none;
  }
  .nav-links--left  { justify-self: start; order: 0; width: auto; }
  .nav-links--right { justify-self: end;   order: 0; width: auto; padding-bottom: 0; }
  .logo { order: 0; }
  .nav-links a { border: 0; padding: .3rem 0; position: relative; }
  .nav-links a::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
    background: var(--ink); transition: right .2s ease;
  }
  .nav-links a:hover::after, .nav-links a.is-active::after { right: 0; }
}

/* ---------- 5. Hero ---------- */
.hero { padding: 2.5rem 0 0; text-align: center; position: relative; }
.hero .lead { margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.6rem; }
.hero-actions .btn { flex: 1 1 190px; max-width: 260px; }

/* dải số liệu nhỏ dưới nút */
.hero-badge { margin-top: 1.8rem; font-size: .88rem; }
.hero-badge b { font-size: 1.15rem; font-weight: 900; color: var(--ink); }
.hero-badge .dots { color: var(--ink); letter-spacing: .18em; }

/* minh hoạ rộng + dải sóng */
.hero-art { margin-top: 1.5rem; }
.hero-art img { width: 100%; }
/* Trên điện thoại: phóng to minh hoạ rồi cắt bớt hai mép cho dễ nhìn */
@media (max-width: 720px) {
  .hero-art, .band-card { overflow: hidden; }
  .hero-art img, .band-card img { width: 210%; max-width: none; margin-left: -55%; }
  .band-card { padding: 1.1rem .6rem; }
}
.wave {
  display: block; width: 100%; height: 42px; margin-top: -1px;
  background: var(--white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 42' preserveAspectRatio='none'%3E%3Cpath d='M0 20c120-22 260 16 420 10s260-30 400-22 260 34 380 22V42H0z' fill='%23000'/%3E%3C/svg%3E") no-repeat center/100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 42' preserveAspectRatio='none'%3E%3Cpath d='M0 20c120-22 260 16 420 10s260-30 400-22 260 34 380 22V42H0z' fill='%23000'/%3E%3C/svg%3E") no-repeat center/100% 100%;
}

/* ---------- 6. Dải 4 điểm mạnh ---------- */
.strip { background: var(--white); padding: .5rem 0 2.2rem; }
.strip-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 820px) { .strip-grid { grid-template-columns: repeat(4, 1fr); } }
.strip-item { display: flex; gap: .7rem; align-items: center; font-size: .88rem; line-height: 1.4; }
.strip-item svg { width: 40px; height: 40px; flex: none; }

/* ---------- 7. Dải teal + thẻ trắng ---------- */
.band { background: var(--ink); padding: 2.5rem 0; }
.band-card {
  background: var(--white); border-radius: var(--r-xl);
  padding: 1.5rem 1rem; overflow: hidden;
}
.band-card img { width: 100%; }
.band-caption { text-align: center; color: rgba(255,255,255,.88); margin: 1.6rem auto 0; max-width: 56ch; }
.band-caption .display { color: #fff; }

/* ---------- 8. Thẻ dịch vụ ---------- */
.grid { display: grid; gap: 1.1rem; }
@media (min-width: 620px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .grid--auto { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid--auto { grid-template-columns: repeat(5, 1fr); } }

.card {
  background: var(--white); border-radius: var(--r-lg); padding: 1.6rem 1.3rem;
  display: flex; flex-direction: column; text-align: center; align-items: center;
  box-shadow: 0 6px 20px rgba(14,90,102,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card svg { width: 56px; height: 56px; margin-bottom: .9rem; }
.card p { flex: 1; font-size: .92rem; }

/* ---------- 9. Chi tiết dịch vụ ---------- */
.svc { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.svc:first-child { border-top: 0; padding-top: .5rem; }
.svc-media { background: var(--white); border-radius: var(--r-lg); padding: .8rem; margin-bottom: 1.4rem; }
.tag-list { list-style: none; padding: 0; margin: 0 0 1.3rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-list li {
  font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); border: 1.5px solid var(--sky); border-radius: var(--r-pill); padding: .4em 1em;
}
.check-list { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; font-size: .93rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M1 5l4 4 8-8' stroke='%230E5A66' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/contain;
}
.note-box { border-left: 3px solid var(--sky); padding: .6rem 0 .6rem 1rem; font-size: .92rem; }
.note-box p { margin: 0; }
@media (min-width: 900px) {
  .svc { padding: 3.5rem 0; }
  .svc-body { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: center; }
  .svc:nth-child(even) .svc-media { order: 2; }
  .svc-media { margin-bottom: 0; }
  .svc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
}

/* ---------- 10. Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
@media (min-width: 760px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-grid figure {
  margin: 0; background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-grid figure:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-grid figcaption { padding: .6rem .9rem .9rem; font-size: .82rem; text-align: center; }
.img-missing { background: repeating-linear-gradient(45deg, var(--paper-2) 0 10px, var(--sky-soft) 10px 20px); }

#pinterest-embed { display: flex; justify-content: center; min-height: 80px; }
.pin-loading { text-align: center; font-size: .9rem; padding: 1.2rem 0; }

/* ---------- 11. Feedback ---------- */
.fb-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .2rem .1rem 1.2rem; scrollbar-width: none; }
.fb-track::-webkit-scrollbar { display: none; }
.fb-card {
  scroll-snap-align: center; flex: 0 0 85%;
  background: var(--white); border-radius: var(--r-lg); padding: 1.5rem; text-align: center;
}
@media (min-width: 700px) { .fb-card { flex-basis: 45%; } }
@media (min-width: 1050px) { .fb-card { flex-basis: 31.5%; } }
.fb-stars { color: var(--ink); letter-spacing: .2em; font-size: .95rem; }
.fb-quote { margin: .6rem 0 1.1rem; font-size: .97rem; color: var(--ink-soft); }
.fb-name { font-family: var(--font-hand); font-weight: 700; font-size: 1.4rem; color: var(--ink); line-height: 1; }
.fb-role { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.fb-nav { display: flex; gap: .7rem; justify-content: center; }
.fb-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); font-size: 1rem; cursor: pointer;
}
.fb-nav button:hover { background: var(--ink); color: #fff; }

/* ---------- 12. Khoá học ---------- */
.course {
  display: flex; flex-direction: column; background: var(--white);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.course:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.course img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--paper-2); }
.course .body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.course-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.course-meta span {
  font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: var(--sky-soft); border-radius: var(--r-pill); padding: .4em 1em;
}
.course .btn { align-self: flex-start; margin-top: .6rem; }

/* ---------- 13. Về Trâm ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.8rem; border-left: 2px dashed var(--sky); }
.timeline li { position: relative; padding-bottom: 1.7rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -2.3rem; top: .4rem; width: 13px; height: 13px;
  border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ink);
}
.timeline .year { font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin-bottom: .1rem; }

/* ---------- 14. Footer ---------- */
.site-footer { background: var(--ink); color: #fff; margin-top: 2.5rem; }
.footer-nav {
  background: var(--paper); border-radius: 0 0 var(--r-xl) var(--r-xl);
  padding: 1rem 0;
}
.footer-nav .nav {
  /* không dùng lưới 3 cột như header — chỉ một logo canh giữa */
  display: flex; justify-content: center; align-items: center;
}
.footer-nav .logo { width: auto; }
.footer-inner { position: relative; padding: 3rem 0 2.5rem; text-align: center; overflow: hidden; }
.footer-inner > * { position: relative; z-index: 1; }
.footer-inner .display { color: #fff; }
.footer-inner p { color: rgba(255,255,255,.85); margin-inline: auto; max-width: 46ch; }
.footer-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.5rem; }
.footer-actions .btn { border-color: #fff; background: #fff; color: var(--ink); }
.footer-actions .btn:hover { background: var(--sky); border-color: var(--sky); color: var(--ink); }
.footer-actions .btn--outline { background: transparent; color: #fff; }
.footer-actions .btn--outline:hover { background: #fff; color: var(--ink); }

/* doodle rải quanh footer */
.footer-doodle { position: absolute; opacity: .55; pointer-events: none; z-index: 0; }
.footer-doodle img { width: 100%; filter: brightness(0) invert(1); }
.d1 { width: 64px; top: 8%;  left: 4%;  rotate: -8deg; }
.d2 { width: 58px; bottom: 12%; left: 10%; rotate: 10deg; }
.d3 { width: 60px; top: 12%; right: 5%;  rotate: 12deg; }
.d4 { width: 56px; bottom: 10%; right: 11%; rotate: -10deg; }
@media (max-width: 780px) { .footer-doodle { display: none; } }

.footer-meta {
  border-top: 1px solid rgba(255,255,255,.22); padding: 1.5rem 0 2rem;
  display: grid; gap: 1rem; justify-items: center; text-align: center;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.3rem; justify-content: center; }
.footer-links a {
  color: #fff; text-decoration: none; font-size: .74rem; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
}
.footer-links a:hover { color: var(--sky); }
.copyright { font-size: .8rem; color: rgba(255,255,255,.7); margin: 0; }

/* ---------- 15. Tiện ích ---------- */
.skip-link { position: absolute; left: -9999px; background: var(--ink); color: #fff; padding: .6em 1em; z-index: 100; }
.skip-link:focus { left: .6rem; top: .6rem; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
