/* File: /public/assets/css/main.css */
:root {
  --max: 960px;
  --gap: 1rem;
  --radius: 12px;
  --border: #eaeaea;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --text: #111111;
  --muted: #555555;
  --link: #1a73e8;
}

/* --- Basic reset --- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif; line-height: 1.6; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }

/* --- Layout --- */
.container { max-width: var(--max); margin-inline: auto; padding: 1rem; }
main.container { padding-top: 1rem; padding-bottom: 2rem; }

/* --- Header --- */
.site-header { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.logo { font-weight: 700; text-decoration: none; color: inherit; padding: .25rem .5rem; border-radius: 8px; }
.logo:focus-visible { outline: 2px dashed var(--link); outline-offset: 2px; }

.main-nav { display: flex; gap: .75rem; flex-wrap: wrap; }
.main-nav a { text-decoration: none; color: inherit; padding: .5rem .75rem; border-radius: 10px; border: 1px solid transparent; }
.main-nav a:hover { background: #fff; border-color: var(--border); }
.main-nav a:focus-visible { outline: 2px dashed var(--link); outline-offset: 2px; }

/* --- Footer --- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); }
.site-footer p { margin: 0; color: var(--muted); }

/* --- Typography --- */
h1 { font-size: clamp(1.6rem, 3vw + 1rem, 2.25rem); margin: 0.5rem 0 0.75rem; }
h2 { font-size: clamp(1.25rem, 2vw + 0.75rem, 1.5rem); margin: 1.25rem 0 0.5rem; }
.lede { color: var(--muted); }

/* --- Links --- */
a { color: var(--link); }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px dashed var(--link); outline-offset: 2px; }

/* --- Cards / lists --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); padding: 0; list-style: none; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; background: #fff; }

/* --- Forms (for future converters) --- */
label { display: block; font-weight: 600; margin-bottom: .25rem; }
input[type="number"], input[type="text"], input[type="email"], input[type="search"] {
  width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; background: #fff;
}
input:focus-visible { outline: 2px dashed var(--link); outline-offset: 2px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem .9rem; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; color: inherit; cursor: pointer; }
button:hover, .btn:hover { background: var(--bg-soft); }
button:focus-visible { outline: 2px dashed var(--link); outline-offset: 2px; }

/* Converter form grid (when you add it) */
.converter-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .75rem; align-items: end; margin: 1rem 0; }
@media (max-width: 720px) {
  .converter-form { grid-template-columns: 1fr; }
}

/* --- Utilities --- */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* --- Prefer reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
