:root {
  color-scheme: dark;
  --ink: #170c07;
  --header-height: 104px;
  --light: #f7e9d0;
  --muted: #d6c2aa;
  --gold: #ecc170;
  --edge: #986f38;
  --display: Georgia, 'Times New Roman', serif;
  --body: system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--light); font: 1rem/1.6 var(--body); }
a { color: inherit; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2 { margin: 0; color: var(--gold); font: 500 2.6rem/1.12 var(--display); text-wrap: balance; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 2px solid #ffda89; outline-offset: 5px; }
.skip { position: absolute; z-index: 2; margin: .5rem; padding: .65rem 1rem; background: var(--ink); transform: translateY(-150%); }
.skip:focus { transform: none; }
.wrap { width: min(100% - 2.5rem, 1060px); margin-inline: auto; }

html { scroll-padding-top: calc(var(--header-height) + 10px); }
.header { position: sticky; top: 0; z-index: 3; background: linear-gradient(180deg, #130904e8, #1309047a); }
.header.scrolled { background: #180d07f5; box-shadow: 0 1px 0 #986f386b, 0 10px 24px #0b05045c; }
.header-inner { width: min(100% - 3rem, 1200px); height: var(--header-height); margin-inline: auto; display: flex; align-items: center; gap: clamp(1.5rem, 7vw, 7rem); }
.brand { display: block; flex: none; }
.brand img { width: auto; height: 80px; object-fit: contain; }
nav { display: flex; align-items: center; gap: clamp(1rem, 4vw, 3.25rem); font: 1rem/1.3 var(--display); }
nav a { white-space: nowrap; text-transform: uppercase; text-decoration: none; padding-block: .5rem; border-bottom: 1px solid transparent; }
nav a:hover, nav a[aria-current] { color: var(--gold); border-color: var(--gold); }
.contact-links a { text-underline-offset: .3em; text-decoration-color: transparent; }
.contact-links a:hover { color: var(--gold); text-decoration-color: currentColor; }

.hero {
  margin-top: calc(-1 * var(--header-height));
  padding-top: var(--header-height);
  background:
    linear-gradient(0deg, #1f1008 0%, #1f1008b3 10%, transparent 34%),
    linear-gradient(90deg, #180a04b3 0%, #180a0447 42%, transparent 68%),
    #1f1008 url('assets/entrada-templo.webp') center 54% / cover no-repeat;
}
.hero-inner { width: min(100% - 3rem, 1200px); display: grid; align-items: center; min-height: clamp(330px, 37vw, 555px); }
.intro { width: min(100%, 620px); text-align: center; padding-block: 2.6rem 3.65rem; }
h1 { font-size: clamp(3rem, 7.3vw, 7.1rem); line-height: .98; letter-spacing: -.035em; text-shadow: 0 4px 16px #100601; }
.intro h1 { text-transform: uppercase; }
.intro h1 > span { display: block; margin-bottom: .55rem; color: var(--light); font-size: .44em; font-style: italic; text-transform: none; letter-spacing: normal; }
.ornament { width: min(70%, 390px); margin: 1.2rem auto; display: flex; align-items: center; justify-content: center; gap: .75rem; color: var(--gold); }
.ornament::before, .ornament::after, .ruled-title::before, .ruled-title::after { content: ''; display: block; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #cfa659); }
.ornament::after, .ruled-title::after { transform: scaleX(-1); }
.ornament span { line-height: 1; }
.ruled-title { display: flex; align-items: center; gap: clamp(.6rem, 2.8vw, 1.7rem); width: min(100%, 740px); margin: 0 auto 1.5rem; text-align: center; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 1.25rem; margin-top: 1.4rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: .6rem 1.45rem; border: 1px solid #d5a859; border-radius: .32rem; background: #1d0c0e; color: var(--light); text-decoration: none; text-align: center; font: 600 1.08rem/1.25 var(--display); }
.intro .button { min-width: 12rem; }
.button:hover { background: #432320; }
.primary { background: linear-gradient(145deg, #ffe2a0, #cb943e); color: #1a0e06; box-shadow: inset 0 0 0 1px #fff1bd80; }
.primary:hover { background: #f5cc79; }

.section { padding-block: clamp(2rem, 5.5vw, 4.25rem); border-top: 1px solid #7c582e; }
.magazine-section { text-align: center; background: radial-gradient(ellipse at 50% 60%, #492714, #241208 60%, #1a0e07); }
.brown { text-align: center; background: radial-gradient(ellipse at 50% 38%, #432315, #24130e 55%, #130c09); }
.section h2 { font-size: clamp(1.85rem, 4.3vw, 3.2rem); }
.carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem clamp(.3rem, 2.8vw, 1.95rem); justify-items: stretch; align-items: center; width: min(100%, 480px); margin: 1.35rem auto 0; }
.curiosities { width: min(100%, 660px); }
.frame { display: grid; place-items: center; width: 100%; min-width: 0; aspect-ratio: 2 / 3; padding: 4px; border: 1px solid #f2c678; background: #1a0d07; box-shadow: 0 0 0 2px #785021, 0 12px 26px #0008; cursor: zoom-in; touch-action: pan-y; }
.curiosities .frame { aspect-ratio: 1; background: #22130d; }
.frame img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.arrow { width: 44px; height: 48px; padding: 0; border: 1px solid transparent; border-radius: .25rem; background: transparent; color: var(--gold); font: 2.8rem/.85 var(--display); }
.arrow:hover { border-color: #9a6f38; background: #09070672; }
.count { grid-column: 2; margin: 0; color: var(--muted); font-size: .82rem; }

.services { background: radial-gradient(ellipse at 45% 0, #392015, #160c07 70%); }
.service-grid { display: grid; align-items: start; grid-template-columns: 1.65fr 1fr; gap: 1.1rem; }
.panel { padding: clamp(1rem, 3vw, 2rem); border: 1px solid #76502f; background: #25150e; border-radius: .4rem; }
.panel h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); margin-bottom: .8rem; }
.panel p { color: var(--muted); }
form label { display: block; font-size: .93rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
input, select { display: block; width: 100%; min-height: 46px; margin: .35rem 0 .95rem; padding: .55rem .65rem; background: #10090a; color: var(--light); border: 1px solid #96754b; border-radius: .25rem; }
.hint { font-size: .85rem; }
.form-actions { justify-content: flex-start; gap: .6rem; }
.form-actions .button { padding-inline: 1rem; }
.footer { padding-block: 2rem; background: #0c0809; border-top: 1px solid #8e6739; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.footer h2 { font-size: 1.8rem; margin-bottom: .5rem; }
address { font-style: normal; }
.contact-links { display: grid; align-content: center; gap: .35rem; overflow-wrap: anywhere; }
.socials { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; color: var(--gold); }

dialog { width: max-content; max-width: calc(100% - 1rem); max-height: 96dvh; padding: 0; border: 1px solid var(--edge); border-radius: .35rem; background: #0c1017; color: var(--light); }
dialog::backdrop { background: #000d; }
.viewer-bar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .4rem .55rem .4rem .85rem; background: #111521; }
.viewer-bar p { margin: 0; font-size: .91rem; }
.viewer-bar button { width: 44px; height: 44px; border: 1px solid var(--edge); border-radius: .25rem; background: transparent; color: var(--gold); font-size: 1.45rem; }
dialog img { width: auto; max-height: calc(96dvh - 74px); margin-inline: auto; object-fit: contain; }

@media (max-width: 780px) {
  :root { --header-height: 76px; }
  .header-inner { width: calc(100% - 1.5rem); gap: clamp(.45rem, 3vw, 1.4rem); }
  .brand img { height: 56px; }
  nav { flex: 1; justify-content: space-between; gap: clamp(.42rem, 2vw, 1.25rem); font-size: clamp(.67rem, 2.4vw, .97rem); }
  .hero-inner { width: calc(100% - 1.5rem); }
  .intro { width: min(100%, 440px); }
  .service-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .wrap { width: calc(100% - 1.5rem); }
  .hero {
    background:
      linear-gradient(0deg, #1f1008 0%, #1f1008bd 32%, #180a047d 80%),
      #1f1008 url('assets/entrada-templo.webp') 67% center / cover no-repeat;
  }
  .hero-inner { min-height: 360px; }
  .intro { padding-block: 2.5rem; }
  .intro .button { min-width: 0; padding-inline: .75rem; font-size: 1rem; }
  .intro .actions { gap: .55rem; }
  .fields, .footer-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-links { margin-top: .8rem; }
  .form-actions .button { flex: 1 1 100%; }
}

.about { background: radial-gradient(ellipse at 65% 0, #402511, #1f1008 76%); border-top: 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, .46fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; }
.about-copy p:last-child { margin-bottom: 0; }
.affiliation { padding: 1.25rem; border: 1px solid #76502f; border-radius: .4rem; background: #1a0e09; text-align: center; }
.affiliation img { width: min(100%, 144px); height: auto; margin: 0 auto .8rem; }
.affiliation p { margin-bottom: .5rem; }
.affiliation a { color: var(--gold); text-underline-offset: .22em; }
@media (max-width: 680px) {
  .about-grid { grid-template-columns: 1fr; }
}
