/* styles/style.css */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@700;800&display=swap');

/* Theme variables */
:root {
  /* Shared page width: equals header/footer/content. Not fixed — clamps to 90vw up to 1400px */
  --page-w: min(1400px, 90vw);

  --bg-0: #f7f4ef;
  --bg-1: #eef3f8;
  --text-900: #1e2430;
  --text-700: #4a5568;
  --brand-700: #0e3a5d; /* deep navy */
  --brand-800: #0b2f4a;
  --gold-500: #e7b84c;
  --gold-600: #d7a83b;
  --card-bg: #ffffff;
  --card-shadow: 0 12px 30px rgba(17, 24, 39, 0.16);
  --card-shadow-hover: 0 18px 40px rgba(17, 24, 39, 0.22);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --ring: 0 0 0 3px rgba(231, 184, 76, 0.25);
}

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

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-900);
  line-height: 1.65;
  background:
    radial-gradient(1200px 600px at -5% -10%, var(--bg-0) 0%, transparent 60%),
    radial-gradient(1200px 600px at 110% 10%, var(--bg-1) 0%, transparent 60%),
    #f2f5f8;
}

/* Headings */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--text-900);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 2vw + 1.5rem, 3rem); }
h2 { font-size: clamp(1.5rem, 1.3vw + 1.2rem, 2.2rem); }
h3 { font-size: clamp(1.2rem, 1vw + 1rem, 1.6rem); }

/* Links */
a {
  color: var(--brand-700);
  text-decoration: none;
  position: relative;
  font-weight: 600;
  transition: color .25s ease, text-shadow .25s ease;
}
a:hover {
  color: var(--gold-600);
  text-shadow: 0 2px 16px rgba(231,184,76,.35);
}

/* Shells — unified widths */
header, footer {
  color: #fff;
  text-align: center;
  width: var(--page-w);
  padding: 20px 0;
  margin: 0 auto;
}

/* Content shell matches header/footer width but remains flexible inside */
.main-container {
  display: flex;
  justify-content: center;
  width: var(--page-w);
  margin: 24px auto;
  gap: 24px;
  padding-inline: 16px; /* small inner gutter so cards don't touch edges */
}

main {
  flex: 3 1 0;
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  min-width: 0; /* allow flex children to shrink and avoid overflow */
}

aside {
  flex: 1 1 50px;
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  min-width: 0;
}

/* Buttons */
button.auth-button,
button,
input[type="submit"],
.button {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-800));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .3s ease;
  box-shadow: 0 8px 20px rgba(14, 58, 93, .25);
}
button.auth-button:hover,
button:hover,
input[type="submit"]:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(14, 58, 93, .35);
  background: linear-gradient(135deg, var(--brand-700), #123f67);
}
button:focus-visible { outline: none; box-shadow: var(--ring); }

/* Card utility */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }

/* Decorative HR */
hr {
  border: none;
  height: 2px;
  margin: 28px 0;
  background: linear-gradient(90deg, transparent, rgba(14,58,93,.25), transparent);
  position: relative;
}
hr::after {
  content: '✧';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  color: var(--gold-500);
  background: #fff;
  padding: 0 8px;
  font-size: 1.1rem;
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
  .main-container { gap: 16px; }
}
@media (max-width: 768px) {
  .main-container, nav, header, footer {
    width: 100%;
    padding: 0;
  }
  .main-container {
    flex-direction: column;
    max-width: 100%;
    gap: 12px;
  }
  main, aside {
    width: 100%;
    margin: 10px 0;
    box-shadow: var(--card-shadow);
  }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
}