@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --ink: #17322e;
  --ink-soft: #506660;
  --cream: #f7f4ec;
  --paper: #fffefa;
  --sun: #f7b846;
  --sun-pale: #fde6af;
  --sage: #dfe9dc;
  --line: rgba(23, 50, 46, .13);
  --shadow: 0 22px 60px rgba(48, 50, 37, .08);
  --radius: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(44, 112, 98, .35);
  outline-offset: 3px;
}

.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 50; top: 12px; left: 12px; padding: 10px 14px; color: white; background: var(--ink); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header {
  width: 100%;
  background: rgba(247, 244, 236, .92);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  width: min(1320px, calc(100% - 48px));
  min-height: 90px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.03em; font-size: 24px; }
.brand-mark { width: 31px; height: 31px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; position: relative; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: currentColor; opacity: .68; }
.brand-mark::before { width: 1px; height: 37px; }
.brand-mark::after { width: 37px; height: 1px; }
.brand-mark span { width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 50%; background: var(--cream); z-index: 1; }
.site-nav { display: flex; align-items: center; gap: 23px; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); }
.eyebrow { margin: 0 0 15px; text-transform: uppercase; color: #71827b; font-size: 13px; line-height: 1; font-weight: 700; letter-spacing: .2em; }
h1, h2, h3, p { margin-top: 0; }
.header-controls { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.control-label { display: block; margin-bottom: 5px; color: #7a8984; text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: .18em; }
.locate-button { min-height: 44px; padding: 0 13px; display: flex; align-items: center; gap: 7px; color: #336b5e; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.locate-button svg { width: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; }
.locate-button[disabled] { opacity: .5; cursor: wait; }
.field { min-height: 44px; display: flex; align-items: center; position: relative; color: var(--ink); background: #eeeee7; border: 1px solid rgba(23, 50, 46, .1); border-radius: 12px; }
.location-picker { width: 260px; position: relative; }
.location-field { width: 100%; }
.location-field > svg:first-of-type { width: 17px; margin-left: 13px; flex: 0 0 auto; fill: none; stroke: #6e7e79; stroke-width: 1.6; }
.location-field input { width: 100%; min-width: 0; height: 44px; padding: 0 5px 0 10px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 14px; font-weight: 600; appearance: none; }
.location-field input::placeholder { color: #73827d; font-weight: 500; opacity: 1; }
.location-field:focus-within { background: var(--paper); border-color: rgba(44, 112, 98, .38); box-shadow: 0 0 0 3px rgba(44, 112, 98, .08); }
.location-field input::-webkit-search-cancel-button { display: none; }
.location-toggle { width: 38px; height: 42px; padding: 0; display: grid; place-items: center; flex: 0 0 auto; color: #71807b; background: transparent; border: 0; border-radius: 10px; }
.location-toggle:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.location-toggle svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .18s ease; }
.location-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.location-results { width: 410px; padding: 10px; position: absolute; z-index: 20; top: calc(100% + 9px); left: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.location-results[hidden] { display: none; }
.location-results-title { margin: 5px 7px 8px; color: #71807b; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; }
.location-group-title { margin: 10px 7px 6px; padding-top: 10px; color: #71807b; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; }
.location-options { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.location-option { width: 100%; padding: 10px 11px; display: flex; align-items: baseline; justify-content: space-between; gap: 18px; color: var(--ink); background: transparent; border: 0; border-radius: 10px; text-align: left; }
.location-option:hover, .location-option:focus-visible { background: #f0f1ea; outline: none; }
.location-option strong { font-size: 16px; }
.location-option span { color: #74837e; font-size: 14px; text-align: right; }
.location-empty { margin: 0; padding: 19px 11px; color: #74837e; font-size: 14px; line-height: 1.45; }
.location-results-footer { margin-top: 7px; padding: 9px 7px 2px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
.location-results-footer button, .location-results-footer a { padding: 0; color: #526b64; background: transparent; border: 0; font-size: 13px; font-weight: 600; text-decoration: none; }
.location-results-footer button:hover, .location-results-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.coordinates { width: 455px; padding: 12px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; position: absolute; z-index: 10; top: calc(100% + 9px); left: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.coordinates[hidden] { display: none; }
.compact-field { padding: 7px 11px; display: block; min-width: 0; }
.compact-field span { display: block; color: #71807b; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.compact-field input { width: 100%; padding: 3px 0 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-weight: 600; }
.apply-button { padding: 0 15px; color: white; background: var(--ink); border: 0; border-radius: 12px; font-size: 14px; font-weight: 700; }
.date-control { width: 245px; min-height: 44px; display: grid; grid-template-columns: 37px 1fr 37px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.date-control label { text-align: center; position: relative; }
.date-control .control-label { display: none; }
.date-control strong { display: block; font-size: 13px; white-space: nowrap; }
.date-control input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-step { width: 31px; height: 31px; display: grid; place-items: center; color: var(--ink); background: transparent; border: 0; border-radius: 9px; }
.date-step:hover { background: #f1f1ea; }
.date-step:last-child { justify-self: end; }
.date-step svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.control-note { max-width: 280px; min-height: 13px; margin: 7px 0 0; color: #7b8984; text-align: right; font-size: 11px; }

.results-section { padding: 48px 0 110px; }
.results-section::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; margin-top: -48px; height: 720px; background: var(--paper); }
.section-heading { margin-bottom: 35px; display: flex; justify-content: space-between; align-items: end; }
.section-heading h1, .section-heading h2, .learn-intro h2 { margin: 0; font-size: clamp(38px, 4vw, 56px); line-height: 1; letter-spacing: -.05em; font-weight: 600; }
.section-heading .eyebrow span + span { letter-spacing: .08em; }
.schedule-meta { display: flex; flex-direction: column; align-items: end; }
.timezone-chip { padding: 9px 13px; color: #63736d; background: #f1f2ec; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; }
.primary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.primary-card { min-height: 195px; padding: 25px 29px; border: 1px solid rgba(23, 50, 46, .08); border-radius: 22px; position: relative; overflow: hidden; }
.sunrise-card { background: #faedcf; }
.daylight-card { background: #e6eee0; }
.sunset-card { background: #e7e4dc; }
.primary-card p { margin: 32px 0 3px; color: #687872; font-size: 16px; font-weight: 600; }
.primary-card strong { display: block; font-size: 50px; letter-spacing: -.06em; line-height: 1.1; }
.primary-card > span { color: #71807a; font-size: 13px; }
.card-icon { position: absolute; right: 26px; top: 23px; width: 49px; height: 49px; border-radius: 50%; border: 1px solid rgba(23, 50, 46, .2); }
.card-icon::before, .card-icon::after { content: ""; position: absolute; }
.sunrise-icon::before, .sunset-icon::before { width: 17px; height: 9px; left: 15px; top: 16px; border-radius: 20px 20px 0 0; background: #d8932e; }
.sunrise-icon::after, .sunset-icon::after { width: 29px; height: 1px; left: 9px; top: 26px; background: var(--ink); box-shadow: 0 5px 0 rgba(23, 50, 46, .35); }
.sunset-icon::before { transform: rotate(180deg); top: 24px; }
.sunset-icon::after { top: 21px; box-shadow: 0 -5px 0 rgba(23, 50, 46, .35); }
.daylight-icon::before { width: 16px; height: 16px; left: 15px; top: 15px; border: 1.5px solid var(--ink); border-radius: 50%; }
.daylight-icon::after { inset: 7px; border: 1px dotted var(--ink); border-radius: 50%; }

.sun-path-card { margin-top: 16px; padding: 31px 35px 22px; background: #17332f; color: white; border-radius: 24px; overflow: hidden; }
.sun-path-header { display: flex; justify-content: space-between; align-items: start; }
.sun-path-header h3 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.sun-path-header .eyebrow { color: #a7b7b1; }
.sun-position { display: flex; align-items: center; gap: 8px; color: #c6d0cc; font-size: 13px; }
.position-dot { width: 7px; height: 7px; background: var(--sun); border-radius: 50%; box-shadow: 0 0 0 4px rgba(247, 184, 70, .12); }
.sun-arc-wrap { height: 240px; margin-top: 5px; position: relative; }
.sun-arc { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arc-area { fill: url(#arc-fill); }
.arc-line { fill: none; stroke: #e2b04c; stroke-width: 1.5; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.horizon { stroke: rgba(255, 255, 255, .16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.arc-sun { position: absolute; left: 50%; top: 7%; width: 28px; height: 28px; margin: -14px; border-radius: 50%; background: #ffc95f; box-shadow: 0 0 34px rgba(255, 201, 95, .54), 0 0 0 7px rgba(255, 201, 95, .09); transition: left .4s, top .4s; }
.arc-sun span { position: absolute; inset: 7px; background: #ffe4a5; border-radius: 50%; }
.arc-label { position: absolute; bottom: -1px; min-width: 100px; }
.arc-label span { display: block; color: #8fa39c; font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
.arc-label strong { font-size: 16px; }
.arc-start { left: 0; }
.arc-noon { left: 50%; text-align: center; transform: translateX(-50%); }
.arc-end { right: 0; text-align: right; }

.details-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr .86fr 1fr; gap: 15px; }
.detail-card { padding: 27px 27px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; }
.detail-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; }
.detail-heading p { margin: 0 0 2px; color: #7a8983; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.detail-heading h3 { margin: 0; font-size: 16px; }
.period-icon { width: 39px; height: 39px; position: relative; flex: 0 0 auto; border-radius: 50%; background: #f4eedc; }
.period-icon::before { content: ""; position: absolute; width: 13px; height: 13px; top: 10px; left: 13px; border-radius: 50%; background: #d89d39; }
.period-icon::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 8px; height: 1px; background: #6a7b75; box-shadow: 0 4px 0 rgba(106, 123, 117, .35); }
.period-icon.evening::before { top: 18px; }
.period-icon.evening::after { bottom: 15px; box-shadow: 0 -4px 0 rgba(106, 123, 117, .35); }
.period-icon.noon::after { width: 23px; height: 23px; inset: 8px; border: 1px dotted #7e8d87; background: none; border-radius: 50%; box-shadow: none; }
.detail-card dl { margin: 0; }
.detail-card dl div { padding: 10px 0; display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); }
.detail-card dt { color: #687872; font-size: 13px; }
.detail-card dd { margin: 0; font-size: 14px; font-weight: 700; }
.noon-time { margin: 14px 0 24px; font-size: 58px; line-height: 1; letter-spacing: -.065em; }
.noon-stats { padding-top: 17px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.noon-stats div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.noon-stats span { display: block; margin-bottom: 4px; color: #73817c; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.noon-stats strong { font-size: 19px; }

.map-section { padding: 110px 0 115px; }
.map-heading-wrap > p { max-width: 280px; margin-bottom: 4px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; text-align: right; }
.map-card { aspect-ratio: 2 / 1; position: relative; overflow: hidden; background: #83b7c0; border: 8px solid var(--paper); border-radius: 28px; box-shadow: var(--shadow); }
#world-map { display: block; width: 100%; height: 100%; cursor: crosshair; }
.map-location { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .9); border-radius: 50%; box-shadow: 0 2px 9px rgba(0, 0, 0, .25); pointer-events: none; }
.map-location span { width: 6px; height: 6px; background: #ffc65e; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 198, 94, .24); }
.map-legend { position: absolute; left: 20px; bottom: 18px; padding: 10px 12px; display: flex; gap: 14px; color: rgba(255, 255, 255, .85); background: rgba(14, 39, 45, .58); border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; backdrop-filter: blur(8px); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.map-legend i { width: 6px; height: 6px; border-radius: 50%; }
.legend-day { background: #f6d181; }.legend-twilight { background: #d27d63; }.legend-night { background: #193242; }
.map-caption { position: absolute; right: 20px; bottom: 18px; padding: 10px 13px; color: white; background: rgba(14, 39, 45, .58); border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; backdrop-filter: blur(8px); font-size: 12px; }
.map-source { position: absolute; right: 18px; top: 16px; padding: 7px 10px; color: rgba(255, 255, 255, .8); background: rgba(14, 39, 45, .45); border: 1px solid rgba(255, 255, 255, .13); border-radius: 999px; backdrop-filter: blur(8px); font-size: 10px; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }
.map-source:hover { color: white; }

.learn-section { padding: 110px 0 120px; display: grid; grid-template-columns: .78fr 1.22fr; gap: 100px; border-top: 1px solid var(--line); }
.learn-intro h2 { margin-bottom: 26px; }
.learn-intro > p:last-child { max-width: 420px; color: var(--ink-soft); line-height: 1.65; }
.learn-list article { padding: 24px 0; display: grid; grid-template-columns: 42px 1fr auto; align-items: start; gap: 18px; border-bottom: 1px solid var(--line); }
.learn-list article:first-child { border-top: 1px solid var(--line); }
.learn-number { color: #a2aaa7; font-size: 12px; font-weight: 700; }
.learn-list h3 { margin-bottom: 7px; font-size: 17px; }
.learn-list p { max-width: 430px; margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.learn-range { padding: 6px 9px; color: #526761; background: #e8ebe4; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }

.site-footer { min-height: 132px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; border-top: 1px solid var(--line); }
.site-footer > p { margin: 0; color: #6f7e79; font-size: 13px; text-align: center; }
.site-footer .footer-note { text-align: right; }
.footer-brand { font-size: 19px; }.footer-brand .brand-mark { transform: scale(.8); transform-origin: left; }

@media (max-width: 900px) {
  .header-bar { min-height: auto; padding: 16px 0; flex-wrap: wrap; gap: 13px; }
  .site-nav { display: none; }
  .header-controls { width: 100%; order: 2; margin-left: 0; }
  .location-picker { width: auto; min-width: 240px; flex: 1; }
  .coordinates { top: calc(100% + 8px); }
  .primary-grid { grid-template-columns: 1fr 1fr; }.primary-card:last-child { grid-column: 1 / -1; }
  .details-grid { grid-template-columns: 1fr 1fr; }.details-grid .detail-card:last-child { grid-column: 1 / -1; }
  .learn-section { gap: 50px; grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-bar { width: calc(100% - 28px); padding: 14px 0; }
  .brand { font-size: 22px; }
  .header-controls { display: grid; grid-template-columns: minmax(0, 1fr) 44px; }
  .location-picker, .location-field { width: 100%; min-width: 0; }
  .location-results { width: calc(100vw - 28px); }
  .locate-button { width: 44px; padding: 0; justify-content: center; }
  .locate-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .locate-button svg { width: 19px; }
  .date-control { width: 100%; grid-column: 1 / -1; }
  .coordinates { width: 100%; top: calc(100% + 8px); grid-template-columns: 1fr 1fr; }
  .apply-button { grid-column: 1 / -1; min-height: 42px; }
  .results-section { padding: 34px 0 80px; }.results-section::before { margin-top: -34px; }
  .section-heading { margin-bottom: 25px; align-items: start; gap: 12px; }.timezone-chip { margin-top: 4px; }.section-heading h1, .section-heading h2 { font-size: 37px; }
  .control-note { display: none; }
  .primary-grid, .details-grid { grid-template-columns: 1fr; }.primary-card:last-child, .details-grid .detail-card:last-child { grid-column: auto; }
  .primary-card { min-height: 134px; padding: 20px 22px; }.primary-card p { margin: 0 0 2px; }.primary-card strong { font-size: 41px; }.card-icon { top: 18px; right: 20px; transform: scale(.86); }
  .sun-path-card { padding: 24px 20px 18px; }.sun-path-header { gap: 20px; }.sun-position { max-width: 150px; text-align: right; }.sun-arc-wrap { height: 180px; }.arc-label { min-width: 70px; }.arc-label span { font-size: 9px; }
  .map-section { padding: 80px 0; }.map-heading-wrap > p { display: none; }.map-card { aspect-ratio: 1.25 / 1; }.map-card canvas { object-fit: cover; }.map-legend { left: 10px; bottom: 10px; gap: 8px; }.map-caption { display: none; }.map-source { top: 10px; right: 10px; }
  .learn-section { padding: 80px 0; }.learn-list article { grid-template-columns: 32px 1fr; }.learn-range { grid-column: 2; justify-self: start; }
  .site-footer { padding: 30px 0; grid-template-columns: 1fr; gap: 14px; text-align: center; }.site-footer .brand { justify-self: center; }.site-footer .footer-note { text-align: center; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
