/* ========================================================================== 
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-background: #f6f1e9; /* soft cream */
  --color-surface: #ffffff;
  --color-text: #3c3128; /* warm brown */
  --color-text-muted: #7a6a5b;
  --color-primary: #3a8e8b; /* tranquil jade/teal */
  --color-primary-soft: #daf0ee;
  --color-accent-gold: #c9a35a;
  --color-success: #4f9a60;
  --color-warning: #d89b3c;
  --color-danger: #c2584a;

  --color-gray-50: #faf7f3;
  --color-gray-100: #f0e7dd;
  --color-gray-200: #e2d5c6;
  --color-gray-300: #cfbfae;
  --color-gray-400: #b6a393;
  --color-gray-500: #9a8877;
  --color-gray-600: #7f6e5f;
  --color-gray-700: #64554a;
  --color-gray-800: #4a3f36;
  --color-gray-900: #302822;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN",
    "Times New Roman", serif;
  --font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  /* Spacing scale (px values) */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-8: 16px;
  --space-10: 20px;
  --space-12: 24px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows (soft, diffused to match serene mood) */
  --shadow-sm: 0 2px 6px rgba(24, 16, 8, 0.06);
  --shadow-md: 0 6px 18px rgba(24, 16, 8, 0.10);
  --shadow-lg: 0 14px 35px rgba(24, 16, 8, 0.16);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --max-width-container: 1120px;
}


/* ========================================================================== 
   Reset / Normalize
   ========================================================================== */

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

button {
  border: none;
  padding: 0;
  background: none;
}

/* Respect user motion preferences */
@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;
    scroll-behavior: auto !important;
  }
}


/* ========================================================================== 
   Base Styles
   ========================================================================== */

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  background: radial-gradient(circle at top left, #fbf6ee 0, #f6f1e9 45%, #efe3d2 100%);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

/* Headings - warm, inviting hierarchy */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-gray-900);
  line-height: var(--line-height-snug);
}

h1 {
  font-size: clamp(2.25rem, 2.4vw + 1.8rem, 3rem);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-16);
}

h2 {
  font-size: clamp(1.75rem, 1.6vw + 1.4rem, 2.25rem);
  margin-top: var(--space-24);
  margin-bottom: var(--space-12);
}

h3 {
  font-size: clamp(1.35rem, 1.1vw + 1.1rem, 1.75rem);
  margin-top: var(--space-20);
  margin-bottom: var(--space-10);
}

h4 {
  font-size: var(--font-size-xl);
  margin-top: var(--space-16);
  margin-bottom: var(--space-8);
}

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-10);

}

small {
  font-size: var(--font-size-sm);
}

strong {
  font-weight: 600;
}

/* Links - subtle, spa-like feel */

a {
  color: var(--color-primary);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--transition-base), text-shadow var(--transition-base);
}

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

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

/* Lists */

ul, ol {
  margin: 0 0 var(--space-10);
  padding-left: var(--space-20);
}

li {
  margin-bottom: var(--space-4);
}

/* Code */

code, pre {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

pre {
  padding: var(--space-10);
  background-color: var(--color-gray-50);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

/* Horizontal rule - subtle divider reminiscent of wood slats */

hr {
  border: 0;
  border-top: 1px solid rgba(100, 85, 74, 0.18);
  margin: var(--space-20) 0;
}


/* ========================================================================== 
   Accessibility & Focus Styles
   ========================================================================== */

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

:focus:not(:focus-visible) {
  outline: none;
}

/* Visually hidden but accessible to screen readers */

.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;
}


/* ========================================================================== 
   Utilities
   ========================================================================== */

/* Container utility - centered content with breathing room */

.container {
  width: 100%;
  max-width: var(--max-width-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

@media (min-width: 960px) {
  .container {
    padding-left: var(--space-24);
    padding-right: var(--space-24);
  }
}

/* Layout helpers */

.flex {
  display: flex;
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-16);
}

@media (max-width: 720px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-16);
}

@media (max-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Simple spacing utilities (margin-bottom only to avoid bloat) */

.mb-0 { margin-bottom: 0 !important; }
.mb-xs { margin-bottom: var(--space-4) !important; }
.mb-sm { margin-bottom: var(--space-8) !important; }
.mb-md { margin-bottom: var(--space-12) !important; }
.mb-lg { margin-bottom: var(--space-20) !important; }
.mb-xl { margin-bottom: var(--space-32) !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }


/* ========================================================================== 
   Components
   ========================================================================== */

/* Buttons - soft pill shapes, subtle depth */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: var(--font-size-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #2f746f);
  color: #fdfbf7;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #3ea29f, #2b6b66);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background-color: rgba(255, 255, 255, 0.6);
  border-color: rgba(100, 85, 74, 0.25);
  color: var(--color-text);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

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

/* Inputs - clean, calm fields */

input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(100, 85, 74, 0.26);
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-gray-500);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(58, 142, 139, 0.4);
  background-color: #ffffff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Cards - soft surfaces with wood-inspired border tint */

.card {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), #f9f4ec);
  border: 1px solid rgba(182, 163, 147, 0.35);
  box-shadow: var(--shadow-sm);
  padding: var(--space-16);
  overflow: hidden;
}



.card-header {
  margin-bottom: var(--space-10);
}

.card-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-lg);
  color: var(--color-gray-900);
  margin: 0 0 var(--space-4);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-sm);
}

/* Optional wood accent strip for cards */

.card--wood::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      135deg,
      rgba(180, 140, 90, 0.14),
      rgba(160, 120, 80, 0.04)
    );
  mix-blend-mode: multiply;
  opacity: 0.7;
}

.card--wood > * {
  position: relative;
  z-index: 1;
}

/* Media wrapper - gently rounded corners for imagery */

.media-rounded {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.media-soft-shadow {
  box-shadow: var(--shadow-md);
}


/* ========================================================================== 
   Theming Hooks for Site-Specific Sections (Guides, Downloads, etc.)
   ========================================================================== */

.section-soft {
  border-radius: var(--radius-xl);
  padding: var(--space-20) var(--space-16);
  background: radial-gradient(circle at top left, #fdf9f3 0, #f4ebe0 40%, #efe1d1 100%);
}



.section-highlight {
  border-radius: var(--radius-xl);
  padding: var(--space-20) var(--space-16);
  background: linear-gradient(145deg, #e5f3f2, #faf7ee);
  border: 1px solid rgba(58, 142, 139, 0.25);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background-color: rgba(201, 163, 90, 0.1);
  color: var(--color-accent-gold);
}

.tag-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  background-color: rgba(58, 142, 139, 0.08);
  color: var(--color-primary);
}


/* ========================================================================== 
   End
   ========================================================================== */
