/* ============================================================
   style.css — CSS Foundation
   Portfolio Site: Huang Li Chung

   Structure:
   1. Custom Properties
   2. Base Reset
   3. Typography
   4. Layout Containers
   5. Links
   6. Images
   7. Focus & Accessibility
   8. Responsive Breakpoints
   9. Site Header
   10. Breadcrumb
   11. CTA Section
   12. Site Footer
   13. Cookie Consent Banner
   14. Hero
   15. Home Sections (Works / About)
   16. About Page
   17. Works Page
   18. Case Detail Page
   19. Cookies Policy Page
   20. 404 Error Page
   ============================================================ */


/* ============================================================
   1. Custom Properties
   ============================================================ */

:root {
  /* --- Colors (site_spec §5) --- */
  --color-primary: #3148F6;
  --color-on-primary: #FFFFFF;
  --color-secondary: #1C4B8F;
  --color-on-secondary: #FFFFFF;
  --color-background: #E9E9E9;
  --color-on-background: #1C2127;
  --color-surface: #FFFFFF;
  --color-on-surface: #1C2127;
  --color-text-body: #1C2127;
  --color-text-heading: #1C2127;
  --color-link: #1C2127;
  --color-link-hover: #3148F6;
  --color-link-visited: #1C2127;

  /* --- Typography (site_spec §6) --- */
  --font-ja: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  --font-en: 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: clamp(1rem, 0.25rem + 1.5625vw, 1.25rem);
  --line-height: 2;

  /* --- Heading Sizes --- */
  --font-size-h1: clamp(1.75rem, 1rem + 1.5625vw, 2.5rem);
  --font-size-h2: clamp(1.375rem, 0.875rem + 1.0417vw, 1.875rem);
  --font-size-h3: clamp(1.125rem, 0.75rem + 0.7813vw, 1.5rem);
  --font-size-h4: clamp(1rem, 0.625rem + 0.5208vw, 1.25rem);

  /* --- Layout Containers (site_spec §7) --- */
  --container-standard: 1200px;
  --container-wide: 1280px;
  --container-text: 760px;

  /* --- Spacing (site_spec §7) --- */
  --gutter: 16px;
  --section-padding: clamp(3rem, 2rem + 2.0833vw, 5rem);
}


/* ============================================================
   2. Base Reset
   ============================================================ */

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

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

body {
  min-height: 100dvh;
  background-color: var(--color-background);
  color: var(--color-text-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
}

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


/* ============================================================
   3. Typography
   ============================================================ */

/* --- Language-based font selection (site_spec §6) --- */

html[lang="ja"] {
  font-family: var(--font-ja);
}

html[lang="en"] {
  font-family: var(--font-en);
}

/* --- Headings --- */

h1, h2, h3, h4 {
  color: var(--color-text-heading);
  font-weight: 700;
  line-height: 1.4;
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

h4 {
  font-size: var(--font-size-h4);
}

/* --- Body text --- */

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
}

small {
  font-size: 0.875em;
}


/* ============================================================
   4. Layout Containers (site_spec §7, BEM)
   ============================================================ */

/* Standard container: 1200px — page-level layout baseline */
.container {
  width: 100%;
  max-width: var(--container-standard);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Wide container: 1280px — Hero, Works listing */
.container--wide {
  max-width: var(--container-wide);
}

/* Text container: 760px — case detail body, About body */
.container--text {
  max-width: var(--container-text);
}


/* ============================================================
   5. Links (site_spec §5, §9)
   ============================================================ */

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

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

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}


/* ============================================================
   6. Images (site_spec §13, seo_spec C-3)
   ============================================================ */

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


/* ============================================================
   7. Focus & Accessibility (site_spec §14)
   ============================================================ */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip to main content (screen reader utility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   8. Responsive Breakpoints (site_spec §7)
   Mobile-first: base = Mobile (≤767px)
   ============================================================ */

/* --- Tablet: 768px — --- */
@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --line-height: 2.2;
  }
}

/* --- Desktop: 1024px — --- */
@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
  }
}


/* ============================================================
   9. Site Header (site_spec §8)
   ============================================================ */

/* --- Skip link (visible on keyboard focus) --- */

.sr-only:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

/* --- Header layout --- */

.site-header {
  position: relative;
  background-color: var(--color-surface);
  z-index: 200;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* --- Logo --- */

.site-header__logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-heading);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-header__logo:hover,
.site-header__logo:visited {
  color: var(--color-text-heading);
  text-decoration: none;
}

/* --- Desktop navigation (hidden on mobile) --- */

.site-header__nav {
  display: none;
}

.site-header__nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-header__nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-body);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.site-header__nav-link:visited {
  color: var(--color-text-body);
}

.site-header__nav-link:hover {
  color: var(--color-link-hover);
}

.site-header__nav-link--active {
  color: var(--color-primary);
}

/* --- Hamburger button --- */

.site-header__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.site-header__hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text-body);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X animation */

.site-header__hamburger[aria-expanded="true"] .site-header__hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header__hamburger[aria-expanded="true"] .site-header__hamburger-line:nth-child(2) {
  opacity: 0;
}

.site-header__hamburger[aria-expanded="true"] .site-header__hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile navigation (open state) --- */

.site-header.is-menu-open .site-header__nav {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding-bottom: 0.5rem;
}

.site-header.is-menu-open .site-header__nav-list {
  flex-direction: column;
  gap: 0;
}

.site-header.is-menu-open .site-header__nav-link {
  display: block;
  padding: 0.875rem var(--gutter);
  font-size: 1rem;
}

.site-header.is-menu-open .site-header__nav-item:not(:last-child) {
  border-bottom: 1px solid var(--color-background);
}

body.is-nav-open {
  overflow: hidden;
}

/* --- Desktop: show nav, hide hamburger --- */

@media (min-width: 1024px) {
  .site-header__nav {
    display: block;
  }

  .site-header__hamburger {
    display: none;
  }

  /* Override mobile open state at desktop */

  .site-header.is-menu-open .site-header__nav {
    position: static;
    box-shadow: none;
    padding-bottom: 0;
  }

  .site-header.is-menu-open .site-header__nav-list {
    flex-direction: row;
    gap: 2rem;
  }

  .site-header.is-menu-open .site-header__nav-link {
    display: inline;
    padding: 0;
    font-size: 0.875rem;
  }

  .site-header.is-menu-open .site-header__nav-item:not(:last-child) {
    border-bottom: none;
  }

  body.is-nav-open {
    overflow: visible;
  }
}


/* ============================================================
   10. Breadcrumb (site_spec §8, seo_spec B-3)
   ============================================================ */

.breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.8125rem;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
}

.breadcrumb__item:not(:last-child)::after {
  content: '/';
  margin: 0 0.5rem;
  color: var(--color-text-body);
}

.breadcrumb__link {
  color: var(--color-text-body);
  text-decoration: none;
}

.breadcrumb__link:visited {
  color: var(--color-text-body);
}

.breadcrumb__link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.breadcrumb__current {
  color: var(--color-text-body);
}


/* ============================================================
   11. CTA Section (site_spec §8)
   ============================================================ */

.cta-section {
  background-color: var(--color-surface);
  padding: var(--section-padding) 0;
  text-align: center;
}

.cta-section__heading {
  font-size: var(--font-size-h3);
  margin-bottom: 0.75rem;
}

.cta-section__text {
  margin-bottom: 2rem;
}

.cta-section__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-section__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 0.75rem 2rem;
  border: 1px solid var(--color-text-body);
  color: var(--color-text-body);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cta-section__link:visited {
  color: var(--color-text-body);
}

/* Button hover: color inversion (site_spec §9) */

.cta-section__link:hover {
  background-color: var(--color-on-background);
  color: var(--color-surface);
  text-decoration: none;
}


/* ============================================================
   12. Site Footer (site_spec §8)
   ============================================================ */

.site-footer {
  background-color: var(--color-on-background);
  color: var(--color-surface);
  padding: 2rem 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.site-footer__link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s ease;
}

.site-footer__link:visited {
  color: rgba(255, 255, 255, 0.85);
}

.site-footer__link:hover {
  color: var(--color-surface);
  text-decoration: underline;
}

.site-footer__copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
  margin-bottom: 0;
}


/* ============================================================
   13. Cookie Consent Banner (site_spec §8)
   ============================================================ */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 1.25rem 0;
}

.cookie-consent--hidden,
.has-cookie-consent .cookie-consent {
  display: none;
}

.cookie-consent__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-consent__text {
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.cookie-consent__link {
  color: var(--color-link);
  text-decoration: underline;
}

.cookie-consent__link:hover {
  color: var(--color-link-hover);
}

.cookie-consent__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.cookie-consent__btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cookie-consent__btn--accept {
  background-color: var(--color-on-background);
  color: var(--color-surface);
  border: 1px solid var(--color-on-background);
}

.cookie-consent__btn--accept:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.cookie-consent__btn--decline {
  background-color: transparent;
  color: var(--color-text-body);
  border: 1px solid var(--color-text-body);
}

.cookie-consent__btn--decline:hover {
  background-color: var(--color-on-background);
  color: var(--color-surface);
  border-color: var(--color-on-background);
}

/* Tablet+: horizontal layout */

@media (min-width: 768px) {
  .cookie-consent__inner {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }

  .cookie-consent__text {
    flex: 1;
  }

  .cookie-consent__actions {
    flex-shrink: 0;
  }
}


/* ============================================================
   14. Hero (site_spec §8)
   ============================================================ */

.hero {
  background-color: var(--color-surface);
  padding: var(--section-padding) 0;
}

.hero__headline {
  font-size: var(--font-size-h1);
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text-heading);
  margin-bottom: 1.5rem;
}

.hero__subheadline {
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text-body);
  max-width: var(--container-text);
}


/* ============================================================
   15. Home Sections — Works / About (top page)
   ============================================================ */

.home-section {
  padding: var(--section-padding) 0;
}

.home-section__heading {
  font-size: var(--font-size-h2);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.home-section__text {
  margin-bottom: 1.5rem;
}

.home-section__media {
  margin-bottom: 1.5rem;
}

.home-section__media img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- LEARN MORE link --- */

.home-section__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 0.75rem 2rem;
  border: 1px solid var(--color-text-body);
  color: var(--color-text-body);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.home-section__link:visited {
  color: var(--color-text-body);
}

/* Button hover: color inversion (site_spec §9) */

.home-section__link:hover {
  background-color: var(--color-on-background);
  color: var(--color-surface);
  text-decoration: none;
}

/* --- Tablet: side-by-side layout --- */

@media (min-width: 768px) {
  .home-section__inner {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 1rem + 2.0833vw, 3rem);
  }

  .home-section__media {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 0;
  }

  .home-section__body {
    flex: 1;
  }

  /* About section: image right, text left */
  .home-section--about .home-section__inner {
    flex-direction: row-reverse;
  }
}

/* --- Desktop: refined spacing --- */

@media (min-width: 1024px) {
  .home-section__inner {
    gap: clamp(2.5rem, 1.5rem + 2.0833vw, 4rem);
  }
}


/* ============================================================
   16. About Page
   ============================================================ */

/* --- About Intro --- */

.about-intro {
  background-color: var(--color-surface);
  padding: var(--section-padding) 0;
}

.about-intro__heading {
  margin-bottom: 2rem;
}

.about-intro__portrait {
  margin-bottom: 2rem;
  text-align: center;
}

.about-intro__portrait img {
  max-width: 280px;
  width: 100%;
  height: auto;
  margin-inline: auto;
}

/* Tablet: side-by-side (image left, text right) */

@media (min-width: 768px) {
  .about-intro__layout {
    display: flex;
    align-items: flex-start;
    gap: clamp(2rem, 1rem + 2.0833vw, 3rem);
  }

  .about-intro__portrait {
    flex: 0 0 35%;
    max-width: 35%;
    margin-bottom: 0;
    text-align: left;
  }

  .about-intro__portrait img {
    max-width: 100%;
  }

  .about-intro__content {
    flex: 1;
  }
}

/* Desktop: refined spacing */

@media (min-width: 1024px) {
  .about-intro__layout {
    gap: clamp(2.5rem, 1.5rem + 2.0833vw, 4rem);
  }
}


/* --- Frameworks --- */

.about-frameworks {
  padding: var(--section-padding) 0;
}

.about-frameworks__heading {
  margin-bottom: 1rem;
}

.about-frameworks__lead {
  margin-bottom: 2.5rem;
}

.about-frameworks__list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-frameworks__item {
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(28, 33, 39, 0.12);
}

.about-frameworks__item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.about-frameworks__item-name {
  font-weight: 700;
  font-size: var(--font-size-h4);
  margin-bottom: 0.5rem;
}

.about-frameworks__item-full {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-text-body);
  opacity: 0.7;
  margin-top: 0.25rem;
}

.about-frameworks__item-desc {
  margin: 0;
}


/* --- Services --- */

.about-services {
  background-color: var(--color-surface);
  padding: var(--section-padding) 0;
}

.about-services__heading {
  margin-bottom: 2rem;
}

.about-services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.about-services__category-title {
  margin-bottom: 0.5rem;
}

.about-services__category-list {
  font-size: 0.9375em;
  margin-bottom: 0;
}

/* Tablet: 2 columns */

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


/* --- Industries (within Services) --- */

.about-services__industries {
  padding-top: 2rem;
  border-top: 1px solid rgba(28, 33, 39, 0.12);
}

.about-services__industries-title {
  font-size: var(--font-size-h4);
  margin-bottom: 0.5rem;
}

.about-services__industries-text {
  margin-bottom: 0;
}


/* ============================================================
   17. Works Page (site_spec §8)
   ============================================================ */

/* --- Works Listing --- */

.works-listing {
  background-color: var(--color-surface);
  padding: var(--section-padding) 0;
}

.works-listing__heading {
  margin-bottom: 1rem;
}

.works-listing__lead {
  margin-bottom: 2.5rem;
  max-width: var(--container-text);
}

/* --- Works Card Grid --- */

.works-listing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 1rem + 1.0417vw, 2rem);
}

/* Tablet: 2 columns */

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

/* Desktop: 3 columns */

@media (min-width: 1024px) {
  .works-listing__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Works Card --- */

.works-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  color: var(--color-text-body);
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}

.works-card:visited {
  color: var(--color-text-body);
}

.works-card:hover {
  text-decoration: none;
  color: var(--color-text-body);
}

/* --- Card Thumbnail --- */

.works-card__thumbnail {
  overflow: hidden;
}

.works-card__thumbnail img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

/* Hover: thumbnail scale(0.9) (site_spec §8) */

.works-card:hover .works-card__thumbnail img {
  transform: scale(0.9);
}

/* --- Card Body --- */

.works-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1rem 1rem;
}

.works-card__title {
  font-size: var(--font-size-h4);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.works-card__category {
  font-size: 0.75rem;
  color: var(--color-text-body);
  opacity: 0.65;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.works-card__text {
  font-size: 0.875rem;
  line-height: 1.8;
  margin-bottom: 0;
}

/* --- Card Arrow (bottom-right, site_spec §8) --- */

.works-card__arrow {
  display: block;
  margin-top: auto;
  padding-top: 1rem;
  text-align: right;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-text-body);
}


/* ============================================================
   18. Case Detail Page (site_spec §8)
   ============================================================ */

/* --- Case Detail --- */

.case-detail {
  background-color: var(--color-surface);
  padding: var(--section-padding) 0;
}

/* Text content constrained to 760px (site_spec §7: 本文コンテナ) */

.case-detail__content {
  max-width: var(--container-text);
  margin-inline: auto;
}

/* --- Heading (h1) --- */

.case-detail__heading {
  margin-bottom: 1.5rem;
}

/* --- Figure (images within standard container) --- */

.case-detail__figure {
  margin: 2rem auto;
  text-align: center;
}

/* --- Meta Info (dl) --- */

.case-detail__meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  background-color: var(--color-background);
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

.case-detail__meta-item dt {
  font-size: 0.75rem;
  opacity: 0.65;
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.case-detail__meta-item dd {
  margin: 0;
  font-size: 0.9375rem;
}

/* Tablet: 2 columns */

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

/* --- Section Title (h2) --- */

.case-detail__section-title {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(28, 33, 39, 0.12);
}

/* --- Step Title (h3) --- */

.case-detail__step-title {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* --- Results List --- */

.case-detail__results-list {
  padding-left: 1.25em;
}

.case-detail__results-list li {
  position: relative;
  margin-bottom: 0.75em;
  padding-left: 0.5em;
}

.case-detail__results-list li::before {
  content: '—';
  position: absolute;
  left: -1.25em;
  color: var(--color-text-body);
}

.case-detail__results-list li:last-child {
  margin-bottom: 0;
}


/* --- Case Navigation --- */

.case-nav {
  padding: var(--section-padding) 0;
}

.case-nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.case-nav__item {
  flex-shrink: 0;
}

.case-nav__item--next {
  text-align: right;
}

.case-nav__link {
  display: block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-text-body);
  color: var(--color-text-body);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.case-nav__link:visited {
  color: var(--color-text-body);
}

/* Button hover: color inversion (site_spec §9) */

.case-nav__link:hover {
  background-color: var(--color-on-background);
  color: var(--color-surface);
  text-decoration: none;
}

.case-nav__label {
  margin-bottom: 0;
}

.case-nav__title {
  margin-bottom: 0;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  opacity: 0.7;
}


/* ============================================================
   19. Cookies Policy Page
   ============================================================ */

/* --- Page Section --- */

.cookies-policy {
  background-color: var(--color-surface);
  padding: var(--section-padding) 0;
}

/* --- Content (text container 760px) --- */

.cookies-policy__content {
  max-width: var(--container-text);
  margin-inline: auto;
}

/* --- Heading (h1) --- */

.cookies-policy__heading {
  margin-bottom: 1.5rem;
}

/* --- Section Title (h2) --- */

.cookies-policy__section-title {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(28, 33, 39, 0.12);
}

/* --- Subsection Title (h3) --- */

.cookies-policy__subsection-title {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* --- Table --- */

.cookies-policy__table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.cookies-policy__table {
  width: 100%;
  min-width: 480px;
  background-color: var(--color-background);
  font-size: 0.9375rem;
}

.cookies-policy__table th,
.cookies-policy__table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(28, 33, 39, 0.08);
}

.cookies-policy__table th {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.65;
  white-space: nowrap;
}

.cookies-policy__table code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 0.875rem;
}

/* --- List --- */

.cookies-policy__list {
  padding-left: 1.5em;
  margin: 1rem 0;
}

.cookies-policy__list li {
  margin-bottom: 0.5em;
}

.cookies-policy__list li:last-child {
  margin-bottom: 0;
}

/* --- Reset Button --- */

.cookies-policy__reset-action {
  margin: 1.5rem 0;
}

.cookies-policy__reset-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-text-body);
  background-color: transparent;
  color: var(--color-text-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cookies-policy__reset-btn:hover {
  background-color: var(--color-on-background);
  color: var(--color-surface);
}

/* --- Update Date --- */

.cookies-policy__update-date {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(28, 33, 39, 0.12);
  font-size: 0.875rem;
  opacity: 0.65;
}


/* ============================================================
   20. 404 Error Page (site_spec §10)
   ============================================================ */

.error-page {
  background-color: var(--color-surface);
  padding-block: var(--section-padding);
}

.error-page__content {
  max-width: var(--container-text);
  margin-inline: auto;
  text-align: center;
}

.error-page__code {
  font-size: clamp(4rem, 2rem + 4.1667vw, 6rem);
  font-weight: 700;
  line-height: 1;
  opacity: 0.15;
  margin-bottom: 2rem;
}

.error-page__block {
  margin-bottom: 2.5rem;
}

.error-page__block:last-child {
  margin-bottom: 0;
}

.error-page__message {
  margin-bottom: 1.25rem;
}

.error-page__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 0.75rem 2rem;
  border: 1px solid var(--color-text-body);
  color: var(--color-text-body);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.error-page__link:visited {
  color: var(--color-text-body);
}

.error-page__link:hover {
  background-color: var(--color-on-background);
  color: var(--color-surface);
  text-decoration: none;
}
