/* Cool Thai House - site stylesheet
   Palette carried over from the original cthstyle.css
   ------------------------------------------------- */

:root {
  --link: #6666cc;
  --link-visited: #999999;
  --link-hover: red;
  --link-active: #663333;
  --text: #222222;
  --muted: #666666;
  --bg: #ffffff;
  --rule: #dddddd;
  --band: #f5f5f2;
  --max: 1100px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 2px solid var(--rule);
  background: var(--bg);
}

.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-logo {
  height: 56px;
  width: auto;
  display: block;
}

.site-title {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.site-tagline {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
}

/* ---------- navigation ---------- */

.site-nav {
  border-bottom: 1px solid var(--rule);
  background: var(--band);
}

.site-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.site-nav a {
  display: block;
  padding: 13px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--link);
  color: var(--link-hover);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--link);
  font-weight: 700;
}

/* ---------- main ---------- */

.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 20px 60px;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h2 {
  font-size: 1.35rem;
  margin: 2em 0 0.6em;
}

h3 {
  font-size: 1.1rem;
  margin: 1.6em 0 0.5em;
}

p { margin: 0 0 1.1em; }

a { color: var(--link); }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); }
a:active { color: var(--link-active); }

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

figure { margin: 1.8em 0; }
figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5em;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.4em 0;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 46em;
}

/* ---------- landing page cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  margin: 2.2em 0;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  transform: translateY(-2px);
}

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body { padding: 16px 18px 20px; }

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--link);
}

.card:hover .card-title { color: var(--link-hover); }

.card-text {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
}

/* ---------- link lists ---------- */

.link-cols {
  columns: 3 240px;
  column-gap: 30px;
  margin: 1.4em 0 2em;
  padding: 0;
  list-style: none;
}

.link-cols li {
  break-inside: avoid;
  margin-bottom: 0.55em;
}

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 1.8em 0;
}

.gallery a { display: block; }
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--band);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

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

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .site-logo { height: 42px; }
  .site-title { font-size: 1.25rem; }
  .site-nav a { padding: 11px 12px; font-size: 0.9rem; }
  .site-main { padding: 24px 16px 48px; }
  .link-cols { columns: 1; }
}
