/* Neurocloudscom — usable ledger aesthetic */
:root {
  --color-ink: #1c2f2c;
  --color-ink-soft: #3d524e;
  --color-muted: #5f736e;
  --color-bg: #eef3f1;
  --color-bg-deep: #d9e4df;
  --color-surface: #f7faf8;
  --color-line: #c5d4ce;
  --color-accent: #1f6b5c;
  --color-accent-hover: #175347;
  --color-gold: #a8893d;
  --color-danger: #9b3b2e;
  --color-ok: #1f6b5c;
  --font-display: "Bai Jamjuree", sans-serif;
  --font-body: "Sarabun", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;
  --radius: 4px;
  --shadow-soft: 0 12px 40px rgba(28, 47, 44, 0.08);
  --header-h: 4.25rem;
  --max: 70rem;
  --measure: 40rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(31, 107, 92, 0.09), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(168, 137, 61, 0.08), transparent 50%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-accent-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-ink);
  margin: 0 0 var(--space-md);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-md); }

ul, ol { margin: 0 0 var(--space-md); padding-left: 1.25rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.main {
  min-height: 60vh;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 2rem, 46rem);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
  height: var(--header-h);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-header__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-header__brand:hover {
  color: var(--color-accent);
}

.site-header__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__list a {
  color: var(--color-ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-header__list a:hover,
.site-header__list a[aria-current="page"] {
  color: var(--color-accent);
}

.site-header__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.site-header__toggle span:not(.visually-hidden) {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--color-ink);
}

@media (max-width: 860px) {
  .site-header__toggle { display: flex; }
  .site-header__nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    padding: var(--space-md) 1rem;
    display: none;
  }
  .site-header__nav.is-open { display: block; }
  .site-header__list {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-line);
  color: var(--color-ink);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-lg);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroDrift 28s ease-in-out infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(16, 36, 33, 0.88) 18%, rgba(16, 36, 33, 0.55) 55%, rgba(16, 36, 33, 0.35) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: var(--space-2xl) 0 var(--space-xl);
  max-width: 38rem;
  margin-left: max(1rem, calc((100% - var(--max)) / 2));
  animation: riseIn 0.9s ease both;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-sm);
  color: #fff;
}

.hero__title {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 var(--space-md);
}

.hero__lead {
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  font-size: 1.05rem;
}

.hero .btn--primary {
  background: var(--color-gold);
  color: var(--color-ink);
}

.hero .btn--primary:hover {
  background: #c4a35a;
  color: var(--color-ink);
}

.hero .btn--ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.hero .btn--ghost:hover {
  border-color: #fff;
  color: #fff;
}

@keyframes heroDrift {
  from { transform: scale(1.05) translate(0, 0); }
  to { transform: scale(1.12) translate(-1.5%, 1%); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.section {
  padding: var(--space-2xl) 0;
}

.section--surface {
  background: var(--color-surface);
  border-block: 1px solid var(--color-line);
}

.section__eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 var(--space-xs);
}

.section__lead {
  max-width: var(--measure);
  color: var(--color-ink-soft);
}

.section__head {
  margin-bottom: var(--space-xl);
  max-width: 36rem;
}

/* Offer strip */
.offer-strip {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 800px) {
  .offer-strip {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}

.offer-strip__visual {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.offer-strip__visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.offer-strip:hover .offer-strip__visual img {
  transform: scale(1.03);
}

.offer-list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 var(--space-lg);
}

.offer-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.4rem;
  border-bottom: 1px solid var(--color-line);
}

.offer-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--color-accent);
  border-radius: 1px;
}

/* Service grid — interaction containers, not decorative cards */
.service-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 700px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-top: 2px solid var(--color-accent);
  padding-top: var(--space-md);
  transition: border-color 0.2s ease;
}

.service-link:hover {
  border-color: var(--color-gold);
  color: inherit;
}

.service-link__img {
  margin-bottom: var(--space-md);
  overflow: hidden;
  border-radius: var(--radius);
}

.service-link__img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.service-link:hover .service-link__img img {
  transform: scale(1.04);
}

.service-link__title {
  margin-bottom: var(--space-xs);
}

.service-link__text {
  color: var(--color-muted);
  margin: 0;
  font-size: 0.98rem;
}

.service-link__meta {
  margin-top: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 600;
}

/* Quotes */
.quote-list {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 800px) {
  .quote-list {
    grid-template-columns: 1fr 1fr;
  }
}

.quote {
  margin: 0;
  padding: 0;
  border: none;
}

.quote__text {
  font-size: 1.08rem;
  color: var(--color-ink-soft);
  margin-bottom: var(--space-md);
}

.quote__text::before {
  content: "“";
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 0;
  margin-right: 0.15rem;
}

.quote__author {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
}

.quote__meta {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin: 0.2rem 0 0;
}

.quote--wide {
  grid-column: 1 / -1;
  max-width: 48rem;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line);
}

/* Page hero (inner) */
.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--color-line);
  background: linear-gradient(180deg, rgba(247, 250, 248, 0.9), transparent);
}

.page-hero__title {
  margin-bottom: var(--space-sm);
}

.page-hero__lead {
  max-width: var(--measure);
  color: var(--color-ink-soft);
  margin: 0;
}

.page-hero--media {
  position: relative;
  min-height: 18rem;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.page-hero--media .page-hero__bg {
  position: absolute;
  inset: 0;
}

.page-hero--media .page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero--media .page-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 36, 33, 0.25), rgba(16, 36, 33, 0.85));
}

.page-hero--media .wrap {
  position: relative;
  z-index: 1;
  padding-bottom: var(--space-xl);
}

.page-hero--media .page-hero__title,
.page-hero--media .page-hero__lead {
  color: #fff;
}

.page-hero--media .page-hero__lead {
  color: rgba(255, 255, 255, 0.85);
}

/* Prose */
.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: var(--space-xl);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: var(--space-md) 0 var(--space-lg);
}

.prose th,
.prose td {
  border: 1px solid var(--color-line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--color-bg-deep);
  font-family: var(--font-display);
}

/* Pricing */
.rate-block {
  display: grid;
  gap: var(--space-lg);
}

.rate-row {
  display: grid;
  gap: var(--space-sm);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-line);
}

@media (min-width: 700px) {
  .rate-row {
    grid-template-columns: 1.4fr 0.6fr;
    align-items: start;
  }
}

.rate-row__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-accent);
  margin: 0;
}

.rate-note {
  margin-top: var(--space-xl);
  padding: var(--space-md);
  background: var(--color-surface);
  border-left: 3px solid var(--color-gold);
}

/* Process timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.timeline__item {
  position: relative;
  padding: 0 0 var(--space-xl) 3rem;
  border-left: 2px solid var(--color-line);
  margin-left: 0.75rem;
  counter-increment: step;
  animation: riseIn 0.6s ease both;
}

.timeline__item:nth-child(1) { animation-delay: 0.05s; }
.timeline__item:nth-child(2) { animation-delay: 0.15s; }
.timeline__item:nth-child(3) { animation-delay: 0.25s; }
.timeline__item:nth-child(4) { animation-delay: 0.35s; }
.timeline__item:nth-child(5) { animation-delay: 0.45s; }

.timeline__item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline__item::before {
  content: counter(step);
  position: absolute;
  left: -1.1rem;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}

/* Blog */
.post-list {
  display: grid;
  gap: var(--space-xl);
}

.post-item {
  display: grid;
  gap: var(--space-md);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--color-line);
  padding-bottom: var(--space-lg);
}

.post-item:hover { color: inherit; }

@media (min-width: 720px) {
  .post-item {
    grid-template-columns: 16rem 1fr;
    align-items: start;
  }
}

.post-item__img {
  overflow: hidden;
  border-radius: var(--radius);
}

.post-item__img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.post-item:hover .post-item__img img {
  transform: scale(1.04);
}

.post-item__date {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0 0 var(--space-xs);
}

/* Detail layout */
.detail-grid {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 900px) {
  .detail-grid {
    grid-template-columns: 1.4fr 0.8fr;
    align-items: start;
  }
}

.detail-aside {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

.detail-aside dl {
  margin: 0 0 var(--space-md);
}

.detail-aside dt {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.75rem;
}

.detail-aside dd {
  margin: 0.15rem 0 0;
}

.team-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 700px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.team-person img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
}

.team-person h3 {
  margin-bottom: 0.25rem;
}

.team-person__role {
  color: var(--color-muted);
  margin: 0 0 var(--space-sm);
  font-size: 0.95rem;
}

/* Forms */
.form {
  display: grid;
  gap: var(--space-md);
  max-width: 34rem;
}

.form__field {
  display: grid;
  gap: 0.35rem;
}

.form__field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.form__field input,
.form__field select,
.form__field textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-ink);
}

.form__field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  outline: 2px solid rgba(31, 107, 92, 0.35);
  border-color: var(--color-accent);
}

.form__error {
  color: var(--color-danger);
  font-size: 0.9rem;
  margin: 0;
  display: none;
}

.form__field.is-invalid .form__error {
  display: block;
}

.form__field.is-invalid input,
.form__field.is-invalid select,
.form__field.is-invalid textarea {
  border-color: var(--color-danger);
}

.form__status {
  display: none;
  padding: var(--space-md);
  border-radius: var(--radius);
  margin-top: var(--space-sm);
}

.form__status.is-success {
  display: block;
  background: rgba(31, 107, 92, 0.12);
  color: var(--color-ok);
  border: 1px solid rgba(31, 107, 92, 0.3);
}

.form__status.is-error {
  display: block;
  background: rgba(155, 59, 46, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(155, 59, 46, 0.3);
}

.contact-panel {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 800px) {
  .contact-panel {
    grid-template-columns: 1fr 0.85fr;
  }
}

.contact-info p {
  margin-bottom: var(--space-md);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--color-ink);
  color: #eef3f1;
  padding: var(--space-md);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
}

.cookie-banner__text {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.95rem;
}

.cookie-banner__text a {
  color: #d4c07a;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.6rem;
}

.cookie-banner .btn--ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cookie-banner .btn--primary {
  background: var(--color-gold);
  color: var(--color-ink);
}

/* Footer */
.site-footer {
  background: #142421;
  color: #c9d6d2;
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.site-footer a {
  color: #e8f0ee;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-gold);
}

.site-footer__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 800px) {
  .site-footer__inner {
    grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr;
  }
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem;
}

.site-footer__tag {
  margin: 0;
  font-size: 0.95rem;
}

.site-footer__heading {
  font-family: var(--font-display);
  color: #fff;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer__copy {
  width: min(100% - 2rem, var(--max));
  margin: var(--space-lg) auto 0;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  color: #8fa39c;
}

/* 404 */
.error-page {
  text-align: center;
  padding: var(--space-2xl) 1rem;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0;
  line-height: 1;
}

/* Journal teaser on home */
.journal-teaser {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 800px) {
  .journal-teaser {
    grid-template-columns: repeat(3, 1fr);
  }
}

.journal-teaser a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.journal-teaser a:hover h3 {
  color: var(--color-accent);
}

.journal-teaser img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--space-sm);
}

.cta-band {
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-xl) 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 32rem;
  margin-inline: auto;
}

.cta-band .btn--primary {
  background: var(--color-gold);
  color: var(--color-ink);
}

.cta-band .btn--ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
