/* ==========================================================================
   Discover Kyoto — Editorial Travel Website
   COM4014 Introduction to Web Authoring
   Stylesheet: style.css
   ========================================================================== */

/* ---------- Imports ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=DM+Sans:wght@300;400;500;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --color-ink: #1a1a1a;
  --color-paper: #f6f1ea;
  --color-paper-dark: #ebe3d6;
  --color-vermillion: #b93126;
  --color-vermillion-dark: #8a241c;
  --color-gold: #b08d57;
  --color-sage: #7a8b73;
  --color-muted: #6b6b6b;
  --color-line: #d9cfc0;

  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --maxw: 1200px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);

  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(26, 26, 26, 0.15);
  --shadow-lg: 0 24px 60px -20px rgba(26, 26, 26, 0.25);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-paper);
  overflow-x: hidden;
}

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

a {
  color: var(--color-vermillion);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--color-vermillion-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a241c;
  margin-bottom: 1rem;
  display: inline-block;
}

.lede {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.5;
  font-style: italic;
  color: var(--color-muted);
  max-width: 60ch;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 4px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  color: var(--color-paper);
}

/* ---------- Header & Navigation ---------- */
.site-header {
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(246, 241, 234, 0.92);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  gap: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-vermillion);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--color-paper);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-ink);
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.25rem 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--color-vermillion);
  transition: width 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a[aria-current="page"]::after {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: var(--color-ink);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(26, 26, 26, 0.55) 0%, rgba(185, 49, 38, 0.35) 100%),
    url('../images/kyoto-hero.jpg') center/cover no-repeat;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.hero .eyebrow {
  color: #f6c96a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 400;
  max-width: 14ch;
  color: #fff;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.9s ease both;
}

.hero h1 em {
  font-style: italic;
  color: #f6c96a;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero p.lede {
  color: rgba(255, 255, 255, 0.92);
  font-style: normal;
  max-width: 48ch;
  animation: fadeUp 0.9s 0.15s ease both;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.9s 0.3s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.8rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-vermillion-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #fff;
}

/* ---------- Sections ---------- */
section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.divider {
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  margin: 2rem auto;
}

/* ---------- Feature grid / cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-paper-dark);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(26, 26, 26, 0.85);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
}

.card-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.card-body p {
  color: var(--color-muted);
  margin-bottom: 1rem;
  flex: 1;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-vermillion);
  align-self: flex-start;
}

.card-link::after {
  content: " →";
  transition: margin-left 0.2s ease;
}

.card:hover .card-link::after {
  margin-left: 4px;
}

/* ---------- Split / editorial block ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.split-alt {
  grid-template-columns: 1fr 1fr;
}

.split-image {
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 1.25rem;
}

.split-text p {
  color: var(--color-muted);
  margin-bottom: 1rem;
}

/* ---------- Stat band ---------- */
.stat-band {
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 4rem 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  color: #f6c96a;
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(246, 241, 234, 0.7);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--color-paper-dark);
  padding: clamp(5rem, 8vw, 7rem) 0 clamp(3rem, 5vw, 4rem);
  border-bottom: 1px solid var(--color-line);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

.page-hero p {
  color: var(--color-muted);
  max-width: 60ch;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ---------- Article / content pages ---------- */
.article h2 {
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  margin: 2.5rem 0 1rem;
}

.article h3 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: var(--color-vermillion);
}

.article p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.article ul,
.article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.article li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article figure {
  margin: 2.5rem 0;
}

.article figure img {
  border-radius: 4px;
  box-shadow: var(--shadow-md);
}

.article figcaption {
  font-size: 0.9rem;
  color: var(--color-muted);
  font-style: italic;
  text-align: center;
  margin-top: 0.75rem;
}

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  color: var(--color-ink);
  border-left: 3px solid var(--color-vermillion);
  padding: 0.5rem 0 0.5rem 1.75rem;
  margin: 2.5rem 0;
  max-width: 60ch;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  grid-auto-flow: dense;
}

.gallery-item {
  overflow: hidden;
  border-radius: 4px;
  position: relative;
  aspect-ratio: 1;
  background: var(--color-paper-dark);
}

.gallery-item.tall { aspect-ratio: 3 / 4; grid-row: span 1; }
.gallery-item.wide { grid-column: span 2; aspect-ratio: 2 / 1; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-within .gallery-caption {
  opacity: 1;
}

/* ---------- Form ---------- */
.form-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.form-intro h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
}

.form-intro p {
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.contact-meta {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-line);
}

.contact-meta dt {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 1rem;
}

.contact-meta dd {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-ink);
}

form.enquiry {
  background: #fff;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--color-vermillion);
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: 0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink);
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: 3px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-vermillion);
  box-shadow: 0 0 0 3px rgba(185, 49, 38, 0.12);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--font-body);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.checkbox-row input {
  width: auto;
  margin-top: 4px;
}

form.enquiry button {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .brand {
  color: var(--color-paper);
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(246, 241, 234, 0.85);
  max-width: 40ch;
  font-size: 0.95rem;
}

.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f6c96a;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: rgba(246, 241, 234, 0.9);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(246, 241, 234, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(246, 241, 234, 0.8);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split,
  .form-wrapper {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .main-nav ul {
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    min-height: 70vh;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-item.wide {
    grid-column: span 1;
    aspect-ratio: 1;
  }
}



@media (max-width: 480px) {
  body { font-size: 16px; }

  .hero h1 { font-size: 2.5rem; }

  .btn { padding: 0.85rem 1.4rem; font-size: 0.88rem; }

  section { padding: 3rem 0; }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .hero-actions { display: none; }
  body { background: #fff; color: #000; }
}
