/* ==========================================================================
   BASE STYLES - Typography, Reset, Utilities
   ========================================================================== */

/* ========== RESET & NORMALIZE ========== */

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

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

body {
  font-family: var(--hamnus-font-sans) !important;
  font-size: var(--hamnus-text-base);
  line-height: 1.7;
  color: var(--hamnus-gray-700);
  background-color: var(--hamnus-gray-50);
  margin: 0;
  padding: 0;
}

/* ========== TYPOGRAPHY ========== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hamnus-font-heading) !important;
  font-weight: 600;
  color: var(--hamnus-gray-900);
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: var(--hamnus-space-4);
}

h1 { font-size: var(--hamnus-text-4xl); }
h2 { font-size: var(--hamnus-text-3xl); }
h3 { font-size: var(--hamnus-text-2xl); }
h4 { font-size: var(--hamnus-text-xl); }
h5 { font-size: var(--hamnus-text-lg); }
h6 { font-size: var(--hamnus-text-base); }

p {
  margin-top: 0;
  margin-bottom: var(--hamnus-space-4);
  color: var(--hamnus-gray-600);
}

a {
  color: var(--hamnus-accent);
  text-decoration: none;
  transition: color var(--hamnus-transition-base);
}

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

strong, b {
  font-weight: 600;
}

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

/* Lists */
ul, ol {
  margin: 0 0 var(--hamnus-space-4) 0;
  padding-left: var(--hamnus-space-6);
}

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

/* Code */
code, pre {
  font-family: var(--hamnus-font-mono);
  font-size: var(--hamnus-text-sm);
}

code {
  background: var(--hamnus-gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: var(--hamnus-radius-sm);
  color: var(--hamnus-primary);
}

pre {
  background: var(--hamnus-gray-800);
  color: var(--hamnus-gray-100);
  padding: var(--hamnus-space-4);
  border-radius: var(--hamnus-radius-lg);
  overflow-x: auto;
  margin-bottom: var(--hamnus-space-4);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--hamnus-accent);
  background: var(--hamnus-gray-50);
  margin: var(--hamnus-space-6) 0;
  padding: var(--hamnus-space-4) var(--hamnus-space-6);
  border-radius: 0 var(--hamnus-radius-lg) var(--hamnus-radius-lg) 0;
  font-style: italic;
  color: var(--hamnus-gray-700);
}

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

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid var(--hamnus-gray-200);
  margin: var(--hamnus-space-8) 0;
}

/* ========== IMAGES ========== */

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

figure {
  margin: 0 0 var(--hamnus-space-4) 0;
}

figcaption {
  font-size: var(--hamnus-text-sm);
  color: var(--hamnus-gray-500);
  margin-top: var(--hamnus-space-2);
  text-align: center;
}

/* ========== FORMS ========== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: var(--hamnus-space-3);
  border: 1px solid var(--hamnus-gray-300);
  border-radius: var(--hamnus-radius-lg);
  font-family: var(--hamnus-font-sans);
  font-size: var(--hamnus-text-base);
  color: var(--hamnus-gray-700);
  background: var(--hamnus-white);
  transition: all var(--hamnus-transition-base);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--hamnus-accent);
  box-shadow: 0 0 0 3px rgba(var(--hamnus-accent-rgb), 0.15);
}

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

label {
  display: block;
  font-size: var(--hamnus-text-sm);
  font-weight: 500;
  color: var(--hamnus-gray-700);
  margin-bottom: var(--hamnus-space-2);
}

button,
input[type="button"],
input[type="submit"] {
  background: var(--hamnus-accent);
  color: var(--hamnus-white);
  border: none;
  padding: var(--hamnus-space-3) var(--hamnus-space-6);
  border-radius: var(--hamnus-radius-lg);
  font-family: var(--hamnus-font-sans);
  font-size: var(--hamnus-text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--hamnus-transition-base);
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background: var(--hamnus-accent-dark);
}

/* ========== TABLES ========== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--hamnus-space-4);
}

th, td {
  padding: var(--hamnus-space-3);
  text-align: left;
  border-bottom: 1px solid var(--hamnus-gray-200);
}

th {
  background: var(--hamnus-gray-50);
  font-weight: 600;
  color: var(--hamnus-gray-700);
}

/* ========== LAYOUT ========== */

.wrapper,
.container {
  max-width: var(--hamnus-container-max);
  margin: 0 auto;
  padding: 0 var(--hamnus-space-6);
}

.site-content,
#content {
  padding: var(--hamnus-space-8) 0;
}

/* ========== SELECTION ========== */

::selection {
  background: var(--hamnus-accent);
  color: var(--hamnus-white);
}

::-moz-selection {
  background: var(--hamnus-accent);
  color: var(--hamnus-white);
}

/* ========== UTILITY CLASSES ========== */

/* Text */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--hamnus-primary); }
.text-accent { color: var(--hamnus-accent); }
.text-muted { color: var(--hamnus-gray-500); }
.text-white { color: var(--hamnus-white); }

.text-sm { font-size: var(--hamnus-text-sm); }
.text-lg { font-size: var(--hamnus-text-lg); }
.text-xl { font-size: var(--hamnus-text-xl); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Background */
.bg-primary { background-color: var(--hamnus-primary); }
.bg-accent { background-color: var(--hamnus-accent); }
.bg-white { background-color: var(--hamnus-white); }
.bg-gray { background-color: var(--hamnus-gray-50); }

/* Spacing */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.p-0 { padding: 0; }

.mt-4 { margin-top: var(--hamnus-space-4); }
.mb-4 { margin-bottom: var(--hamnus-space-4); }
.mt-8 { margin-top: var(--hamnus-space-8); }
.mb-8 { margin-bottom: var(--hamnus-space-8); }

/* Display */
.hidden { display: none !important; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* Flexbox */
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--hamnus-space-2); }
.gap-4 { gap: var(--hamnus-space-4); }

/* Borders */
.rounded { border-radius: var(--hamnus-radius-lg); }
.rounded-full { border-radius: var(--hamnus-radius-full); }

/* Shadows */
.shadow { box-shadow: var(--hamnus-shadow-md); }
.shadow-lg { box-shadow: var(--hamnus-shadow-lg); }

/* Screen Reader Only */
.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;
}
