/* FlowReels — shared foundation */

:root {
  --ink: #080b09;
  --ink-2: #0b100d;
  --ink-3: #101512;
  --surface: #121914;
  --surface-2: #17201a;
  --line: rgba(205, 255, 219, 0.12);
  --line-strong: rgba(205, 255, 219, 0.22);
  --text: #f3f7f1;
  --text-soft: #c5d0c7;
  --muted: #93a097;
  --accent: #2bf093;
  --accent-bright: #b9ffd2;
  --mint: #b6f9c6;
  --deep-green: #18733f;
  --danger: #ff7a8a;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --font-display: "Bricolage Grotesque", "Noto Sans Thai", "Noto Sans JP", "Hiragino Sans", sans-serif;
  --font-body: "Manrope", "Noto Sans Thai", "Noto Sans JP", "Hiragino Sans", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --header-h: 76px;
  --page-max: 1360px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: #071009;
}

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

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #071009;
  font-weight: 800;
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  position: relative;
  isolation: isolate;
}

#main {
  scroll-margin-top: var(--header-h);
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(8, 11, 9, 0.92), rgba(8, 11, 9, 0.62));
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(8, 11, 9, 0.92);
  border-bottom-color: var(--line);
}

.header-inner {
  width: 100%;
  max-width: var(--page-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  border-radius: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-wordmark {
  width: auto;
  height: 19px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s var(--ease-out);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  right: 0;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-switch {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-globe,
.lang-chevron {
  position: absolute;
  pointer-events: none;
  color: var(--muted);
}

.lang-globe {
  left: 12px;
  width: 13px;
  height: 13px;
}

.lang-chevron {
  right: 10px;
  width: 12px;
  height: 12px;
}

.lang-select {
  -webkit-appearance: none;
  appearance: none;
  min-width: 122px;
  max-width: 150px;
  padding: 9px 30px 9px 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.lang-select:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.lang-select option {
  background: var(--ink-3);
  color: var(--text);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition:
    transform 0.25s var(--ease-out),
    opacity 0.2s ease;
}

.site-header.is-open .menu-toggle span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.site-header.is-open .menu-toggle span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition:
    transform 0.25s var(--ease-out),
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--accent);
  color: #061109;
  box-shadow: 0 10px 34px rgba(43, 240, 147, 0.14);
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 16px 44px rgba(43, 240, 147, 0.24);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(43, 240, 147, 0.42);
  background: rgba(43, 240, 147, 0.06);
}

/* Footer */
.site-footer {
  position: relative;
  background: #070a08;
  border-top: 1px solid var(--line);
  padding: 64px 32px 26px;
}

.footer-inner {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) 0.7fr 0.7fr 1fr;
  gap: 48px;
}

.footer-brand .brand {
  margin-bottom: 18px;
}

.footer-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.footer-brand .brand-wordmark {
  height: 17px;
}

.footer-tagline {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-col h3 {
  margin: 6px 0 18px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-link {
  display: block;
  width: fit-content;
  margin: 0 0 11px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-email {
  display: inline-block;
  width: fit-content;
  margin-top: 2px;
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.footer-email:hover {
  color: var(--accent);
}

.footer-bottom {
  width: 100%;
  max-width: var(--page-max);
  margin: 54px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-bottom p {
  margin: 0;
  color: #75827a;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.footer-made {
  text-align: right;
}

/* Shared section furniture */
.section {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 112px 32px;
}

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 55%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(43, 240, 147, 0.12);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 46px;
}

.section-head-copy {
  max-width: 760px;
}

.section-title {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 4.8vw, 64px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.section-lead {
  max-width: 420px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* Reveal motion */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.75s ease,
    transform 0.75s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

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

@media (max-width: 1100px) {
  .footer-inner {
    grid-template-columns: minmax(240px, 1.4fr) 0.7fr 0.7fr 1fr;
    gap: 34px;
  }

  .section {
    padding: 94px 28px;
  }
}

@media (max-width: 900px) {
  .header-inner {
    padding: 0 22px;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 16px;
    right: 16px;
    z-index: 70;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #0c110e;
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.22s ease,
      transform 0.22s var(--ease-out),
      visibility 0.22s;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    padding: 15px 14px;
    border-radius: 12px;
    font-size: 12px;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.045);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .section {
    padding: 84px 24px;
  }

  .section-head {
    display: block;
    margin-bottom: 36px;
  }

  .section-lead {
    max-width: 560px;
    margin-top: 18px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 38px 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    margin-top: 42px;
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: 68px;
  }

  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .brand-wordmark {
    height: 17px;
  }

  .header-tools {
    gap: 8px;
  }

  .lang-select {
    min-width: 106px;
    max-width: 118px;
    padding: 8px 26px 8px 28px;
    font-size: 10px;
  }

  .lang-globe {
    left: 10px;
    width: 11px;
    height: 11px;
  }

  .lang-chevron {
    right: 9px;
    width: 10px;
    height: 10px;
  }

  .menu-toggle {
    width: 36px;
    height: 36px;
  }

  .section {
    padding: 72px 20px;
  }

  .section-title {
    font-size: clamp(36px, 11vw, 48px);
  }

  .site-footer {
    padding: 52px 20px 22px;
  }

  .footer-inner {
    gap: 32px 18px;
  }

  .footer-bottom {
    display: block;
    margin-top: 36px;
    padding-top: 18px;
  }

  .footer-made {
    margin-top: 7px;
    text-align: left;
  }

  .btn {
    min-height: 48px;
    padding: 13px 20px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .brand-wordmark {
    display: 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;
  }

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